-
Notifications
You must be signed in to change notification settings - Fork 499
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
Expose database query / application metrics on internal /metrics
endpoint
#620
Comments
this should probably not be internet facing |
Thanks @MonsieurNicolas, it makes sense to somehow restrict access to these extra database metrics. A user could potentially restrict access to the |
Having a second http listener started on an alternate port I have dreams of Horizon metrics being in Prometheus, Grafana, etc. |
Is instrumenting the application with https://github.com/prometheus/client_golang an option ? It would avoid the need for an external exporter and allow Prometheus to scrape Horizon directly ? |
/metrics
endpoint/metrics
endpoint
Just added a couple PRs connected to this:
When all are merged I'll deploy it to the staging server and we can try integrate it with our Prometheus server. |
All PRs above are merged. When it comes to DB metrics it requires a small refactor of |
It's done in #2846. It should help adding more metrics soon. @stellar/horizon-committers if you have ideas regarding new metrics please add them as a comment here. Here's my list:
When it comes to SQL queries stats, I'm wondering if we should do it. First, majority of endpoints send a single SQL query to get results so we can easily track this using HTTP stats. Second, often we modify SQL query string for the same query type. Obvious example is inserts batch builders. We'd need to name each query and probably have a second param explaining the number of rows being added. |
If it's not already there. How about ingestion throughput (ledgers/time)
and captive core stats (CPU and memory consumption of captive core). Also,
the reingestion status (how many workers, what ledger ranges are being
reingested, what's the progress in each of them).
…On Fri, Jul 24, 2020, 16:05 Bartek Nowotarski ***@***.***> wrote:
Is instrumenting the application with
https://github.com/prometheus/client_golang an option ?
It's done in #2846 <#2846>. It should
help adding more metrics soon.
@stellar/horizon-committers
<https://github.com/orgs/stellar/teams/horizon-committers> if you have
ideas regarding new metrics please add them as a comment here. Here's my
list:
- Duration of the processing time for each ingestion processor. Per
change/transaction breakdown.
- Counter for each tx/op error type returned by txsub.
- Duration of the order book graph state update per ledger.
- LedgerEntryChangeCache
<https://godoc.org/github.com/stellar/go/exp/ingest/io#LedgerEntryChangeCache>
compression ratio stats.
When it comes to SQL queries stats, I'm wondering if we should do it.
First, majority of endpoints send a single SQL query to get results so we
can easily track this using HTTP stats. Second, often we modify SQL query
string for the same query type. Obvious example is inserts batch builders.
We'd need to name each query and probably have a second param explaining
the number of rows being added.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#620 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASA4JEAK72LL4ZWECWJO73R5GIKPANCNFSM4FSADRSQ>
.
|
I think you're talking about reingestion, right? We already have a summary for processed ledgers (that includes a counter) but throughput in the online mode will be stable at 1 ledger per 5 seconds on average. I don't think we have Captive Core CPU and memory stats available via Go so it should be done at OS level. For reingestion stats (# of workers, throughput - makes sense here, progress per worker, etc.) 👍. |
Added one more metric here: #2921. Closing this, let's open a separate issue for each metric when it's really needed. |
To assist during debugging and capacity planning, it would prove useful to expose database metrics on the
/metrics
Horizon endpoint.Ideally we would namespace the metrics to distinguish Horizon vs Core database queries.
The text was updated successfully, but these errors were encountered: