-
Notifications
You must be signed in to change notification settings - Fork 797
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
[api] Implement a delegating no-op MeterProvider #3622
Comments
I don't have concrete figures right now, but I'm wondering if creating delegation for every What about exposing an event in the API when the registered global meter/tracer provider is being updated? |
I was also wondering about that. Also, looking closer into it, keeping track of the batch observable callbacks could be rather tricky with this approach. I wanted to refrain from exposing the event in the API to keep the API surface small, but it may be the only way to do it. I'll look into how Python handles the delegating no-op, maybe I'm missing something here. 🤔 |
We can also ask in the maintainer meeting |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Is your feature request related to a problem? Please describe.
Currently when a
MeterProvider
is registered viametrics.setMeterProvider()
after acquiring ametrics.getMeterProivder()
elsewhere, the previously acquiredMeterProvider
will stay no-op forever unless replaced manually. This causes instrumentations that are registered before the creation of an SDKMeterProvider
to never provide any metrics.Describe the solution you'd like
Implementing the same delegating-noop similar to the one in the trace API, where a
ProxyTracerProvider
andProxyTracer
delegate calls to either the registered SDK instance or aNoopTracerProvider
orNoopTracer
.Describe alternatives you've considered
MeterProvider
,Meter
, orInstrument
instances, once a newMeterProvider
is registered. However, this may require significant implementation overhead for anyone who wants to take care of such a case.Additional context
Related
The text was updated successfully, but these errors were encountered: