-
Notifications
You must be signed in to change notification settings - Fork 821
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
Meter metrics get override in instrumentations after setMeterProvider has called #3249
Comments
Hmm, I wonder if we should add an optional |
I can see this common metrics problem diverging from the tracing part as the metric instruments need to be re-created after the meter provider has been updated. An abstract method called |
Yea sounds like a good solution. You can assign this to me :) |
How will this work when you want to use histogram as a metric? You would need to define a view for a histogram to ensure the correct buckets are used and you can only define Views when instantiating the meter provider. |
Instrumentations are supposed to create histogram metrics in the Yes, a MeterProvider must be constructed with views before setting it up with instrumentation. That is to say, metrics API didn't provide a means to instruct the SDK to configure the buckets for a histogram right now. It's being tracked at open-telemetry/opentelemetry-specification#2229. |
Hey guys, I'm currently working on the MongoDB metrics collections and noticed some issue (not huge but can lead to many bugs in the future).
In order to produce metrics, we need to create some metric instruments, and these metric instruments automatically get overridden when setting a new meter provider.
Maybe it's ok and that's the best practice but it requires the instrumentations to implement something like:
The text was updated successfully, but these errors were encountered: