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().
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: