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

Document OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE environment variable #1405

Closed
pichlermarc opened this issue Oct 11, 2022 · 9 comments · Fixed by #3542
Closed

Document OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE environment variable #1405

pichlermarc opened this issue Oct 11, 2022 · 9 comments · Fixed by #3542
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@pichlermarc
Copy link
Member

pichlermarc commented Oct 11, 2022

Feature Request

Is your feature request related to a problem? Please describe.
Currently the OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE enviornment variable is not used to configure the export temporality (see here).

The spec states that:

If a language provides a mechanism to automatically configure a
MetricReader to pair with the associated
Exporter (e.g., using the OTEL_METRICS_EXPORTER environment
variable
),
then by default:

  • The exporter MUST be paired with a periodic exporting
    MetricReader
    .
  • The exporter MUST configure the default aggregation temporality on the
    basis of instrument kind using the
    OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE variable
    as described
    below.
  • The exporter MUST configure the default aggregation on the basis of instrument kind using
    the OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION variable as described below if it is implemented.

Describe the solution you'd like
Allow configuration of aggregation temporality via OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE

Additional context
As this is a MUST requirement in the spec, this might also be a bug.

@pellared
Copy link
Member

pellared commented Oct 12, 2022

Thanks for reporting the issue. I created a similar one in the OTel .NET SDK: open-telemetry/opentelemetry-dotnet#3756

@pichlermarc
Copy link
Member Author

Hi, @pellared thanks for creating the issue in the core repo. 🙂

I was not sure if here is the right place, or if I should open it in the core repo, but as the condition part of this spec

If a language provides a mechanism to automatically configure a MetricReader to pair with the associated Exporter (e.g., using the OTEL_METRICS_EXPORTER environment variable), then by default

is implemented in this repo, I opted to open the issue here instead. 🙂

If there's a consensus where this feature belongs then I can also dedicate some time to implement this if necessary. 🙂

@Kielek
Copy link
Contributor

Kielek commented Oct 12, 2022

@pichlermarc, we have a plan release 0.4.0-beta shortly. If it is important feature for you we can include it into this code base. If it can wait it should be implemented in the api/sdk repository.

Upgrade path for OTel API/SDK 1.4.0 will be more complicated and it will take more time.

If there's a consensus where this feature belongs then I can also dedicate some time to implement this if necessary. 🙂

Sounds great!

@pellared
Copy link
Member

If there's a consensus where this feature belongs then I can also dedicate some time to implement this if necessary. 🙂

It is fine to implement it here before it is supported via the SDK 👍 We are open to your contribution 🎉

@nrcventura nrcventura added this to the 0.5.0-beta milestone Oct 12, 2022
@pellared
Copy link
Member

@pichlermarc Are you working on it? Do you need any help?

@pichlermarc
Copy link
Member Author

@pellared, sorry, I did not get around to doing this yet. :/
I'll comment here when I get to working on it.

@RassK
Copy link
Contributor

RassK commented Nov 9, 2022

This PR adds a workaround for a moment missing direct configuration option.
#1542

@pellared pellared modified the milestones: 0.5.0-beta, 0.6.0-beta, 0.7.1, 0.7.0 Nov 16, 2022
@Kielek Kielek modified the milestones: 0.5.2, post-1.0.0 Jan 19, 2023
@pichlermarc
Copy link
Member Author

Hi, I just went over old issues I created and this seems to be already implemented.

I just tried this out using the automatic instrumentation docs on opentelemetry.io, switched the exporter to OTLP and set up the environment variable.

Big thanks to the person who took care of that 🙂

@pellared
Copy link
Member

pellared commented Feb 7, 2024

Reopening as the environment variable is not documented.

@pellared pellared reopened this Feb 7, 2024
@pellared pellared changed the title Allow configuration of aggregation temporality via environment variable Document OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE environment variable Feb 7, 2024
@pellared pellared added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 7, 2024
@pellared pellared modified the milestones: vNext, 1.4.0 Feb 7, 2024
@Kielek Kielek modified the milestones: 1.4.0, 1.5.0 Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
5 participants