You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specification/configuration/sdk-environment-variables.md
+24-13Lines changed: 24 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,18 @@ aliases:
10
10
11
11
**Status**: [Mixed](../document-status.md)
12
12
13
-
The goal of this specification is to unify the environment variable names between different OpenTelemetry SDK implementations. SDKs MAY choose to allow configuration via the environment variables in this specification, but are not required to. If they do, they SHOULD use the names listed in this document.
13
+
The goal of this specification is to unify the environment variable names between different OpenTelemetry implementations.
14
+
15
+
Implementations MAY choose to allow configuration via the environment variables in this specification, but are not required to.
16
+
If they do, they SHOULD use the names listed in this document.
17
+
18
+
## Implementation guidelines
19
+
20
+
**Status**: [Stable](../document-status.md)
21
+
22
+
Environment variables MAY be handled (implemented) directly by a component, in the SDK, or in a separate component (e.g. environment-based autoconfiguration component).
23
+
24
+
The environment-based configuration MUST have a direct code configuration equivalent.
14
25
15
26
## Parsing empty value
16
27
@@ -25,25 +36,25 @@ The SDK MUST interpret an empty value of an environment variable the same way as
25
36
### Boolean value
26
37
27
38
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.
28
-
An SDK MUST NOT extend this definition and define additional values that are interpreted as true.
39
+
An implementation MUST NOT extend this definition and define additional values that are interpreted as true.
29
40
Any value not explicitly defined here as a true value, including unset and empty values, MUST be interpreted as false.
30
41
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.
31
42
All Boolean environment variables SHOULD be named and defined such that false is the expected safe default behavior.
32
43
Renaming or changing the default value MUST NOT happen without a major version upgrade.
33
44
34
45
### Numeric value
35
46
36
-
If an SDK chooses to support an integer-valued environment variable, it SHOULD support nonnegative values between 0 and 2³¹ − 1 (inclusive). Individual SDKs MAY choose to support a larger range of values.
47
+
If an implementation chooses to support an integer-valued environment variable, it SHOULD support nonnegative values between 0 and 2³¹ − 1 (inclusive). Individual SDKs MAY choose to support a larger range of values.
37
48
38
49
> The following paragraph was added after stabilization and the requirements are
39
-
thus qualified as "SHOULD" to allow SDKs to avoid breaking changes.
50
+
thus qualified as "SHOULD" to allow implementations to avoid breaking changes.
40
51
For new
41
52
implementations, these should be treated as MUST requirements.
42
53
43
-
For variables accepting a numeric value, if the user provides a value the SDK cannot parse,
44
-
or which is outside the valid range for the configuration item, the SDK SHOULD
54
+
For variables accepting a numeric value, if the user provides a value the implementation cannot parse,
55
+
or which is outside the valid range for the configuration item, the implementation SHOULD
45
56
generate a warning and gracefully ignore the setting, i.e., treat them as not set.
46
-
In particular, SDKs
57
+
In particular, implementations
47
58
SHOULD NOT assign a custom interpretation e.g. to negative values if a negative
48
59
value does not naturally apply to a configuration and does not have an explicitly specified meaning, but treat it like any other
49
60
invalid value.
@@ -57,15 +68,15 @@ because it might reset a value set from other configuration sources with the def
57
68
58
69
### Enum value
59
70
60
-
For variables which accept a known value out of a set, i.e., an enum value, SDK implementations MAY support additional values not listed here.
61
-
For variables accepting an enum value, if the user provides a value the SDK does not recognize, the SDK MUST generate a warning and gracefully ignore the setting.
71
+
For variables which accept a known value out of a set, i.e., an enum value, implementations MAY support additional values not listed here.
72
+
For variables accepting an enum value, if the user provides a value the implementation does not recognize, the implementation MUST generate a warning and gracefully ignore the setting.
62
73
63
74
If a null object (empty, no-op) value is acceptable, then the enum value representing it MUST be `"none"`.
64
75
65
76
### Duration
66
77
67
78
Any value that represents a duration, for example a timeout, MUST be an integer representing a number of
68
-
milliseconds. The value is non-negative - if a negative value is provided, the SDK MUST generate a warning,
79
+
milliseconds. The value is non-negative - if a negative value is provided, the implementation MUST generate a warning,
69
80
gracefully ignore the setting and use the default value if it is defined.
70
81
71
82
For example, the value `12000` indicates 12000 milliseconds, i.e., 12 seconds.
@@ -82,7 +93,7 @@ For example, the value `12000` indicates 12000 milliseconds, i.e., 12 seconds.
82
93
| OTEL_LOG_LEVEL | Log level used by the SDK logger | "info" ||
83
94
| 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. |
84
95
| OTEL_TRACES_SAMPLER | Sampler to be used for traces | "parentbased_always_on" | See [Sampling](../trace/sdk.md#sampling)|
85
-
| 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. |
96
+
| 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 implementation MUST behave as if OTEL_TRACES_SAMPLER_ARG is not set. |
86
97
87
98
Known values for `OTEL_PROPAGATORS` are:
88
99
@@ -140,7 +151,7 @@ Depending on the value of `OTEL_TRACES_SAMPLER`, `OTEL_TRACES_SAMPLER_ARG` may b
140
151
141
152
## Attribute Limits
142
153
143
-
SDKs SHOULD only offer environment variables for the types of attributes, for
154
+
Implementations SHOULD only offer environment variables for the types of attributes, for
144
155
which that SDK implements truncation mechanism.
145
156
146
157
See the SDK [Attribute Limits](../common/README.md#attribute-limits) section for the definition of the limits.
@@ -219,7 +230,7 @@ We define environment variables for setting one or more exporters per signal.
219
230
| OTEL_METRICS_EXPORTER | Metrics exporter to be used | "otlp" |
220
231
| OTEL_LOGS_EXPORTER | Logs exporter to be used | "otlp" |
221
232
222
-
The SDK MAY accept a comma-separated list to enable setting multiple exporters.
233
+
The implementation MAY accept a comma-separated list to enable setting multiple exporters.
Copy file name to clipboardExpand all lines: specification/protocol/exporter.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ This document specifies the configuration options available to the OpenTelemetry
11
11
## Configuration Options
12
12
13
13
The following configuration options MUST be available to configure the OTLP exporter.
14
-
The configuration options MAY be implemented directly in the OTLP exporter, in the SDK, or in a separate component (e.g. environment-based autoconfiguration component).
15
14
Each configuration option MUST be overridable by a signal specific option.
16
15
17
16
-**Endpoint (OTLP/HTTP)**: Target URL to which the exporter is going to send spans or metrics. The endpoint MUST be a valid URL with scheme (http or https) and host, MAY contain a port, SHOULD contain a path and MUST NOT contain other parts (such as query string or fragment). A scheme of https indicates a secure connection. When using `OTEL_EXPORTER_OTLP_ENDPOINT`, exporters MUST construct per-signal URLs as [described below](#endpoint-urls-for-otlphttp). The per-signal endpoint configuration options take precedence and can be used to override this behavior (the URL is used as-is for them, without any modifications). See the [OTLP Specification][otlphttp-req] for more details.
0 commit comments