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
There's already a MetricProducer interface that mirrors the spec. Its in an internal package and has to stay internal until the spec stabilizes.
MetricProducer extends an empty interface called CollectionRegistration. CollectionRegistration shows up in MetricReader#register, which is akin to the proposed MetricReader#registerProducer method. The idea is that MetricProducers register are each registered with MetricReaders during SdkMeterProvider initialization.
CollectionRegistration is empty and we use a weird trick to cast to MetricProducer, which is actually useful.
I think we once the spec is stable, we could shake things up and achieve an API that is in line with the spirit of the spec, but with some minor changes we're locked into by the fact that the recently added spec details didn't exist when we had to write some of this code. I would propose adding a CollectionRegistration#getMetricProducer method. It would be ideal if we could rename CollectionRegistration to MetricProducer and include the collectAllMetrics() method, but that would be a breaking change.
Now that I've written that all out, I'm not sure how much progress can be made on this front with stabilizing the spec.
Describe the solution you'd like
After open-telemetry/opentelemetry-specification#2951, and open-telemetry/opentelemetry-specification#2979, we should update our OpenCensus bridge implementation to comply with the new specification.
Note that the specifications are experimental.
Changes:
cc @jack-berg @jsuereth @psx95
The text was updated successfully, but these errors were encountered: