How MeterProvider works between API and SDK #4082
-
Hi All, I have been reading the source code of runtime (tag v7.0.2)
In the listener, all callbacks are no-op which is expected I think (API should be separated from SDK, so no data should be passed)?
Correct me if I am wrong. Now, the real question here is - actually two questions -
In summary, how the data pass between API and SDK parts, which gives us the Metric to be exported? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
AggregationManager
is not at all connected/related to OpenTelemetry. Its used by .NET runtime itself for tools like dotnet-counters.OpenTelemetry uses MeterListener to subscribe to Metric updates from the API (DiagnosticSource): https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry/Metrics/MeterProviderSdk.cs#L152
There is no logic to be replaced - DS gives call backs. OTel uses it to get raw measurements, and aggregates them following OTel spec.