-
Notifications
You must be signed in to change notification settings - Fork 293
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
[OpenTelemetry.Instrumentation.Process] Multiple provider dispose issue #831
Comments
Agreed, this seems like a spec limitation. The semantics define
I don't think instrumentation can maintain state like this without violating the spec in some way. This definition seems be be geared toward an out-of-proc implementation like the collector's host metrics receiver. I haven't found other languages that have implemented For example,
with a footnote
Some reasoning for this is presented here. I think it gets the same problem we're bumping up against. Should we consider doing something similar? That is, just compute utilization based on some fixed recent interval? |
Commented here as well open-telemetry/opentelemetry-specification#2439 (comment) |
Issue with OpenTelemetry.Instrumentation.Process
process.cpu.utilization
requires tracking of the last collection time. When multiple providers are used, it needs to track it based on the provider. There isn't a really good way to do this. What we're doing is creating aMeter
instance for each provider. But each instance has the same name forMeter
&Instrument
s so SDK is probably just treating everything as one data stream. To compound that problem, when a provider is disposed it should dispose its instrumentation. Due to the same name issue this leads to all providers being unsubscribed if one provider is disposed.Update: There is a failing test which demonstrates the disposal problem.
The text was updated successfully, but these errors were encountered: