-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add Prometheus integration #17
Comments
Hi @cyriltovena Agree that observability is a good thing and that's why I'm kinda happy to keep this library without dependencies (also Prometheus client isn't a light one 😢 ) but not going to say "NO, NO PROM PLEASE" without full picture :D Also check this one, I thought same pattern can be used with |
The collector pattern could work, that was my first lead, but I figured it's hard to know when a transport is not used anymore and so when to stop polling it. Not going to say it's impossible, but a global stats would have been easier IMO. |
Hm, that's interesting. How the global metrics will solve this problem? I understand that for your case global is okay ('cause it's used in only 1 app) but what will happen when this lib is used by 2 other libraries by example. Am I missing something? |
I don't disagree but our usage makes it hard for sure. |
For example in tempo this is how the stats is used: https://github.com/grafana/tempo/pull/790/files#diff-b1699c73b6dad09e708e097215ab78277d0d5c75f816463aa94de2842c09ab97R26 I'm concerned about leaking the goroutine and the ticker. |
I might be able to use finalizer for my use case. |
Oh, you've closed the issue before I asked 1 more question :( Anyway :)
Aren't you controlling where you're using hedged client? So basically you've:
And just with the slightly propagated As in your example (https://github.com/grafana/tempo/blob/main/tempodb/backend/instrumentation/hedged_requests.go#L26) you can just add context param to |
What do we think about adding Prometheus integration to this library.
It seems hard to do outside of the library. Something I could contribute if needed.
The text was updated successfully, but these errors were encountered: