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 OTEL_SDK_DISABLED #60

Open
pbrisbin opened this issue Mar 6, 2023 · 0 comments
Open

Support OTEL_SDK_DISABLED #60

pbrisbin opened this issue Mar 6, 2023 · 0 comments

Comments

@pbrisbin
Copy link
Collaborator

pbrisbin commented Mar 6, 2023

We'd love to see support for OTEL_SDK_DISABLED, so we don't need conditionals in our code to only enable tracing in environments where it's appropriate. Today, we add code to read this variable ourselves and initialize with emptyTracerProviderOptions when set, or our usual way when not.

https://opentelemetry.io/docs/reference/specification/sdk-environment-variables/#general-sdk-configuration

Boolean value. If “true”, a no-op SDK implementation will be used for all telemetry signals. Any other value or absence of the variable will have no effect and the SDK will remain enabled. This setting has no effect on propagators configured through the OTEL_PROPAGATORS variable.

Further details on encoding booleans: https://opentelemetry.io/docs/reference/specification/sdk-environment-variables/#boolean-value.

Any value that represents a Boolean MUST be set to true only by the case-insensitive string "true", meaning "True" or "TRUE" are also accepted, as true. An SDK MUST NOT extend this definition and define additional values that are interpreted as true. Any value not explicitly defined here as a true value, including unset and empty values, MUST be interpreted as false. If any value other than a true value, case-insensitive string "false", empty, or unset is used, a warning SHOULD be logged to inform users about the fallback to false being applied. All Boolean environment variables SHOULD be named and defined such that false is the expected safe default behavior. Renaming or changing the default value MUST NOT happen without a major version upgrade.

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

1 participant