opentelemetry-specification
opentelemetry-specification copied to clipboard
OpenCensus Metrics bridge using MetricProducer
Part of https://github.com/open-telemetry/opentelemetry-specification/issues/1175
Related to https://github.com/open-telemetry/oteps/pull/210
Changes
- Add a MetricProducer interface to the metrics SDK. It is an optional argument when creating a MetricReader meant to support non-SDK sources of metric data.
- Specify how to implement the MetricProducer interface using metrics from the global OpenCensus state.
This follows the path taken by the java opencensus-shim.
Alternatives
OpenCensus MetricReaders
Instead of implementing a new MetricProducer interface, shims could implement the existing MetricReader interface. Shims would have to implement both a periodic (push) metric reader, and a manual (pull) metric reader. This would duplicate logic in the periodic metric reader, but would not introduce a new interface.
Related OTEP(s) https://github.com/open-telemetry/oteps/pull/210