-
Notifications
You must be signed in to change notification settings - Fork 21
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: Expose pgxpool metrics #18
Conversation
Adapted from https://github.com/nhatthm/otelsql, this change allows pgxpool stats to be collected and then exposed through the OpenTelemetry metrics API. Uses the new Metrics API released in v0.35.0 - https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.12.0.
We're a bit swamped at the moment and couldn't find the time to give this PR the proper attention. But we'll get to it eventually! |
@costela hi, I could use this feature, maybe we can look into it now? |
I'm sorry for keeping you waiting for so long. I gotta admit I'm having trouble reviewing and testing this because we don't use the OTEL metrics interfaces internally, only Prometheus via https://github.com/prometheus/client_golang. Would you be able to include an example (either here, or in the README) on how to make this work with Prometheus? Then I'd have an easier time testing this. Thank you! |
Yes I can do that. If you are just asking for the metrics to ultimately end up in Prometheus server, that would be accomplished with the OTEL Collector. Using either the prometheusexporter, or the prometheusremotewriteexporter. Prometheus has also recently added support for native OTLP ingestion, although I have not used it and unaware of it's stability. I'll have to dig up some concrete configuration examples of how to use the OTEL collector to send the OTLP metrics to Prometheus, the links provide most of the examples, but I will get to it eventually. |
Hey! We're also interested in this. Any work remaining to get this merged into main? |
Closing in favor of #43. |
Adapted from https://github.com/nhatthm/otelsql, this change allows pgxpool stats to be collected and then exposed through the OpenTelemetry metrics API.
Uses the new Metrics API released in v0.35.0 -
https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.12.0.