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

Environment variable to set metrics producers #4015

Closed
gouthamve opened this issue Apr 26, 2024 · 3 comments
Closed

Environment variable to set metrics producers #4015

gouthamve opened this issue Apr 26, 2024 · 3 comments
Assignees
Labels
area:configuration Related to configuring the SDK sig-issue A specific SIG should look into this before discussing at the spec spec:metrics Related to the specification/metrics directory

Comments

@gouthamve
Copy link
Member

What are you trying to achieve?

I was trying to use the autoexport package in Golang SDK which configures the exporting and SDK through the environment variables in semantic conventions.

However, I needed to add the Prometheus metrics producer and there was no way to do it when using autoexport.

I'd like to propose a new environment variable OTEL_METRICS_PRODUCERS where users can pass comma separated producer values.

Additional context.

open-telemetry/opentelemetry-go-contrib#5281 has an implementation of this environment variable. cc @dashpole @pellared

I know there is a moratorium on new environment variables, but I'd like to atleast merge the above PR as EXPERIMENTAL to unblock my use-case.

@gouthamve gouthamve added the spec:metrics Related to the specification/metrics directory label Apr 26, 2024
@danielgblanco danielgblanco added area:configuration Related to configuring the SDK sig-issue A specific SIG should look into this before discussing at the spec triage:deciding:tc-inbox Needs attention from the TC in order to move forward labels Apr 29, 2024
@danielgblanco
Copy link
Contributor

I believe this needs input from the TC as per this comment. I also added this to the Configuration SIG inbox, as they will be interested in this issue.

@jack-berg
Copy link
Member

From a file configuration standpoint, metric producers are an SDK extension point. We support referencing custom implementations of SDK extension points via the component provider mechanism. If someone wants to open a PR to https://github.com/open-telemetry/opentelemetry-configuration to extend the schema with the metric producers, I'm supportive.

@jack-berg
Copy link
Member

This is being added to file configuration in open-telemetry/opentelemetry-configuration#90

Discussed (briefly) in the 5/22 TC and we believe that file configuration should be sufficient and we should not add a new environment variable for this. I.e. under the moratorium this is considered non-essential.

codeboten pushed a commit to open-telemetry/opentelemetry-configuration that referenced this issue May 23, 2024
Part of open-telemetry/opentelemetry-specification#4015

Metric producers are registered to metric readers, so i've nested it under the periodic and manual readers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:configuration Related to configuring the SDK sig-issue A specific SIG should look into this before discussing at the spec spec:metrics Related to the specification/metrics directory
Development

No branches or pull requests

4 participants