-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Chain & explorer Prometheus metrics #10063
base: master
Are you sure you want to change the base?
Conversation
10ef1f2
to
8336f10
Compare
8336f10
to
a19d490
Compare
Was an example from the PR description fetched from a live instance? How it's possible that |
end | ||
|
||
defp set_metrics do | ||
set_handler_metric(:weekly_success_transactions_number) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's going to be executed synchronously right, each metric one by one? Can we realistically hit a 1 hour duration for all queries in total, so that it will impact interval duration? Does it make sense to run them concurrently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I wrapped all metrics to asynchronous task in c400611.
set_metrics() | ||
schedule_next_run() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If set_metrics()
is synchronous and blocking, then intervals between calls to set_metrics
will be greater than 1 hour and can become uneven. I think it might make sense to either make set_metrics
asynchronous or switch the order of this 2 statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put schedule_next_run
before running setting metrics task. c400611
6721a54
to
0f662e6
Compare
…ns in active users metric
fc729d4
to
2b128a2
Compare
That was a local run - so it might happen because of accounts participated in token transfers, internal transactions etc, and current version of active accounts query takes into account only transactions. I extended the query for active accounts with join of extracting active users from token transfers and internal transactions - though this will increase query execution time. |
Resolves #10064
Motivation
Add chain & explorer metrics to
/metrics
endpoint.Changelog
New metrics exposed at
/metrics
endpoint:Checklist for your Pull Request (PR)
master
in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.