Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify if MetricProducers can be registered with config instead of a method #3611

Closed
aabmass opened this issue Jul 19, 2023 · 1 comment · Fixed by #3613
Closed

Clarify if MetricProducers can be registered with config instead of a method #3611

aabmass opened this issue Jul 19, 2023 · 1 comment · Fixed by #3613
Assignees
Labels
spec:metrics Related to the specification/metrics directory

Comments

@aabmass
Copy link
Member

aabmass commented Jul 19, 2023

The spec defines a MetricProducer.RegisterProducer() function for binding metric producers to a reader. It says

RegisterProducer is expected to be called during initialization, but MAY be invoked later.

While implementing this in JS (open-telemetry/opentelemetry-js#4007), we already have a (stable) setMetricProducer() (singular) function which is expected to bind the reader specifically to an SDK instance. In order to implement the spec, I decided to instead add a MetricReader constructor argument accepting any additional MetricProducers.

  • Is this OK spec wise? I imagine it is.
  • Can/should we update the spec to make this more open ended? We have more vague wording for this kind of thing elsewhere e.g. "X SHOULD provide a way to ..."

Wanted to discuss this for #3599 @dashpole

@aabmass aabmass added the spec:metrics Related to the specification/metrics directory label Jul 19, 2023
@dashpole
Copy link
Contributor

I think we should update the spec to make this more open-ended. I don't recall "late registration" being the reason we landed on the current design, so I think it is fine to relax that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:metrics Related to the specification/metrics directory
Projects
No open projects
3 participants