diff --git a/CHANGELOG.md b/CHANGELOG.md index 175e730e834..a285d2f7613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -146,6 +146,9 @@ release. ### SDK Configuration +- Add the OTEL_SDK_DISABLED environment variable to the SDK configuration. + ([2679](https://github.com/open-telemetry/opentelemetry-specification/pull/2679)) + - Mark `OTEL_METRIC_EXPORT_INTERVAL`, `OTEL_METRIC_EXPORT_TIMEOUT` environment variables as Stable ([#2658](https://github.com/open-telemetry/opentelemetry-specification/pull/2658)) diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index 8f9a4d9e461..757d9c2ccb9 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -266,7 +266,8 @@ Disclaimer: this list of features is still a work in progress, please refer to t Note: Support for environment variables is optional. |Feature |Go | Java |JS |Python|Ruby|Erlang|PHP|Rust|C++|.NET|Swift| -|--------------------------------------------------|---|------|---|------|----|------|---|----|---|----|-----| +|--------------------------------------------------|--|------|---|------|----|------|---|----|---|----|-----| +|OTEL_SDK_DISABLED | - | - | - | - | - | - | - | - | - | - | - | |OTEL_RESOURCE_ATTRIBUTES | + | + | + | + | + | + | + | + | + | + | - | |OTEL_SERVICE_NAME | + | + | + | + | + | + | + | | | + | | |OTEL_LOG_LEVEL | - | - | + | [-][py1059] | + | - | - | | - | - | - | diff --git a/specification/sdk-environment-variables.md b/specification/sdk-environment-variables.md index 5d6c9fe813a..ac185d766c6 100644 --- a/specification/sdk-environment-variables.md +++ b/specification/sdk-environment-variables.md @@ -48,12 +48,13 @@ For example, the value `12000` indicates 12000 milliseconds, i.e., 12 seconds. | Name | Description | Default | Notes | | ------------------------ | ------------------------------------------------- | --------------------------------- | ----------------------------------- | +| OTEL_SDK_DISABLED | Disable the SDK for all signals | false | 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.| | OTEL_RESOURCE_ATTRIBUTES | Key-value pairs to be used as resource attributes | See [Resource semantic conventions](resource/semantic_conventions/README.md#semantic-attributes-with-sdk-provided-default-value) for details. | See [Resource SDK](./resource/sdk.md#specifying-resource-information-via-an-environment-variable) for more details. | | OTEL_SERVICE_NAME | Sets the value of the [`service.name`](./resource/semantic_conventions/README.md#service) resource attribute | | If `service.name` is also provided in `OTEL_RESOURCE_ATTRIBUTES`, then `OTEL_SERVICE_NAME` takes precedence. | | OTEL_LOG_LEVEL | Log level used by the SDK logger | "info" | | | OTEL_PROPAGATORS | Propagators to be used as a comma-separated list | "tracecontext,baggage" | Values MUST be deduplicated in order to register a `Propagator` only once. | | OTEL_TRACES_SAMPLER | Sampler to be used for traces | "parentbased_always_on" | See [Sampling](./trace/sdk.md#sampling) | -| OTEL_TRACES_SAMPLER_ARG | String value to be used as the sampler argument | | The specified value will only be used if OTEL_TRACES_SAMPLER is set. Each Sampler type defines its own expected input, if any. Invalid or unrecognized input MUST be logged and MUST be otherwise ignored, i.e. the SDK MUST behave as if OTEL_TRACES_SAMPLER_ARG is not set. | +| OTEL_TRACES_SAMPLER_ARG | String value to be used as the sampler argument | | The specified value will only be used if OTEL_TRACES_SAMPLER is set. Each Sampler type defines its own expected input, if any. Invalid or unrecognized input MUST be logged and MUST be otherwise ignored, i.e. the SDK MUST behave as if OTEL_TRACES_SAMPLER_ARG is not set. | Known values for `OTEL_PROPAGATORS` are: