You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was removed in #2105 to reduce scope prior to 1.0.
Describe the solution you'd like:
I wanted to file a feature request for the eventual re-implementation of this part of the spec, and share my use case for it.
I'm using MetricProducer from opentelemetry_sdk v0.24.1 to adapt runtime metrics from the Tokio async runtime library, and to export them alongside application-defined metrics that use the OpenTelemetry SDK in a more traditional way. My main reason for using a MetricProducer is that it lets me create a HistogramDataPoint from already-aggregated histogram counter values produced by the Tokio library. Each Tokio worker thread has an array of histogram counters representing different buckets, and these counters are incremented during performance-sensitive operations by the library. When MetricProducer::produce() is called, my implementation reads those per-thread bucket counts, and outputs a HistogramDataPoint. I cannot use SDK histogram instruments, because Tokio does not expose the elapsed time underlying this histogram to user code, only the already-aggregated histogram, and the only API that SDK histogram instruments provide is record().
We are really interested in this implementation of this part of the spec. Similar to @divergentdave we plan to rely on OpenTelemetry to re-export metrics from other source into OpenTelemetry format.
The current main pain point is the histogram part where we get already computed histogram but want to re-export them into OpenTelemetry histogram. It seems the MetricProducer perfectly fit into this use case.
@cijothomas is there any plan to put back this part of the spec into scope?
Yes this was only removed to keep scope in control for Metrics SDK stable release. We are almost ready to declare Metrics SDK stable. @fraillt has some changes being worked on related to Export structures, and will impact producer implementation.
Once this is done, we can re-add Producer support back.
(If anyone has bandwidth to contribute, we are happy to help reviews etc. Please wait 1-3 weeks when we expect to close the pending discussion and declare Metrics Sdk stable)
Related Problems?
This was removed in #2105 to reduce scope prior to 1.0.
Describe the solution you'd like:
I wanted to file a feature request for the eventual re-implementation of this part of the spec, and share my use case for it.
I'm using
MetricProducer
fromopentelemetry_sdk
v0.24.1 to adapt runtime metrics from the Tokio async runtime library, and to export them alongside application-defined metrics that use the OpenTelemetry SDK in a more traditional way. My main reason for using aMetricProducer
is that it lets me create aHistogramDataPoint
from already-aggregated histogram counter values produced by the Tokio library. Each Tokio worker thread has an array of histogram counters representing different buckets, and these counters are incremented during performance-sensitive operations by the library. WhenMetricProducer::produce()
is called, my implementation reads those per-thread bucket counts, and outputs aHistogramDataPoint
. I cannot use SDK histogram instruments, because Tokio does not expose the elapsed time underlying this histogram to user code, only the already-aggregated histogram, and the only API that SDK histogram instruments provide isrecord()
.For reference, here's the source: https://github.com/divviup/janus/blob/e21f8663ad33902b03f5cf627b9cb6223646ad1f/aggregator/src/metrics/tokio_runtime.rs
Considered Alternatives
No response
Additional Context
MetricProducer is defined in the specification.
The text was updated successfully, but these errors were encountered: