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

support standard OpenTelemetry envvars where appropriate #11

Closed
tobert opened this issue Apr 1, 2021 · 8 comments
Closed

support standard OpenTelemetry envvars where appropriate #11

tobert opened this issue Apr 1, 2021 · 8 comments
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed minor minor semver

Comments

@tobert
Copy link
Collaborator

tobert commented Apr 1, 2021

via @ahayworth, otel-cli should support the standard envvars that make sense

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md

@cyrille-leclerc
Copy link

Supporting more Otel Auto Configurer environment variables would be great.

Here are some environment variable that look particularly valuable when integrating the otel-cli with the Jenkins OpenTelemetry Plugin so that Jenkins pipeline sh steps could invoke the otel-cli transparently passing all the context and settings via environment variables:

Environment variable  Value when used with the Jenkins OpenTelemetry Plugin Comments
OTEL_SERVICE_NAME Name of the service, default is "jenkins", can be customized in the Jenkins configuration I'm not clear why the otel-cli preferred to use OTEL_CLI_SERVICE_NAME rather than OTEL_SERVICE_NAME
OTEL_RESOURCE_ATTRIBUTES  Attributes characterizing the Jenkins instance, primarily jenkins.url
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS... Defined in the Jenkins config screen Most of them seem to be already supported, see Otel Specs > OpenTelemetry Protocol Exporter

@tobert tobert added bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed minor minor semver labels Aug 18, 2021
@tobert
Copy link
Collaborator Author

tobert commented Aug 18, 2021

With #35 merged I can finally start writing tests that validate envvar configs in a system test, so I'll be working on this in the next few days.

@tobert
Copy link
Collaborator Author

tobert commented Aug 24, 2021

@cyrille-leclerc iirc I chose OTEL_CLI_SERVICE_NAME because I wasn't aware of the otel specs for envvars at that point.

I did some testing tricks in equinix-labs/otel-init-go#2 that I will port over here so we can not only add the envvars but test that they're working right. That can come after the initial changes to align with the otel specs though.

@spuliaiev-sfdc
Copy link

Any updated on that?

@tobert
Copy link
Collaborator Author

tobert commented Feb 14, 2023

@spuliaiev-sfdc as of PR #120 things should be in good shape. I'm not aware of any envvars that don't match the specs. There are also now tests in place that check the vars all the way through otel-cli to the server.

Please let me know if there's something important to you that's missing!

@spuliaiev-sfdc
Copy link

Am I missing the change to read OTEL_SERVICE_NAME when OTEL_CLI_SERVICE_NAME is not provided?

@tobert
Copy link
Collaborator Author

tobert commented Feb 15, 2023

@spuliaiev-sfdc you're right, that needs fixed. I've started on #158.

tobert added a commit that referenced this issue Feb 16, 2023
Solves a request in #11.

* add failing test for OTEL_SERVICE_NAME

* add OTEL_SERVICE_NAME

Also shortcut config items that don't have envvars.
@tobert
Copy link
Collaborator Author

tobert commented Jun 13, 2023

This should be resolved as of v0.3.0. There's more opportunity to use service attribute autodetection but that's a topic for antoher issue. Please open a new issue for envvars you need that aren't supported yet.

@tobert tobert closed this as completed Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed minor minor semver
Projects
None yet
Development

No branches or pull requests

3 participants