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

Zero-code OTEL_ support #5167

Open
robross0606 opened this issue Nov 15, 2024 · 4 comments
Open

Zero-code OTEL_ support #5167

robross0606 opened this issue Nov 15, 2024 · 4 comments

Comments

@robross0606
Copy link

robross0606 commented Nov 15, 2024

We're trying to figure out which (if any) "zero code" configuration is supported by the JS library and available information seems very confusing. For example, there are pages that show OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_SERVICE_NAME and/or OTEL_SDK_DISABLED is supported and then other pages which claim limited or no support, which contradicts other examples and pages. Is there some definitive list of which zero code configuration options are supported by the Javascript library for Node.js use?

@dyladan
Copy link
Member

dyladan commented Nov 15, 2024

The first link is a getting started guide for JS which is not comprehensive. The second link is the specification which includes all environment variables defined by the project regardless of their support in any given language. Generally implementations follow that list, but some may not be implemented yet. The only truly definitive list is in the code https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-core/src/utils/environment.ts#L88

Environment variable use is spread among many packages which each have their own documentation, but I don't think there is a centralized list of supported environment variables.

@robross0606
Copy link
Author

Is there an example anywhere of how to actually leverage these environment variables? All the examples appear to use programmatic initialization which I would think overrides things like OTEL_EXPORTER_OTLP_ENDPOINT.

@robross0606
Copy link
Author

Specifically, we are having no luck getting OTEL_SERVICE_NAME to work. We have confirmed it is set on the environment, but traces continue to come into our OTEL collector as "unknown_service". If we set it programmatically that problem goes away.

@chancancode
Copy link
Contributor

Hi @robross0606! I stumbled across this issue, I tried reproducing it but couldn't replicate the problem you reported (OTEL_SERVICE_NAME not working as expected).

I made a repo with a simple reproduction based on the official docs, you can use the code and steps in there to confirm my findings: https://github.com/tildeio/otel-js-demos/tree/5167-otel-service-name

Hopefully with that, you'd be able to find out what's different about your environment and fix the issue on your end. If you determined the condition/interactions that causes this to fail, feel free to provide extra details on how the reproduction can be tweaked to demonstrate the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants