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: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This repository contains the JSON schema that defines the OpenTelemetry configur
12
12
13
13
The [examples](./examples) repository contains a variety of sample configuration files to help get started and illustrate useful patterns. The following are noteworthy:
14
14
15
-
-[sdk-migration-config.yaml](./examples/sdk-migration-config.yaml): Includes env var substitution references to all [standard environment variables](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md) which map cleanly to file configuration (see notes in the example for the set of env vars which are not referenced). Note, SDKs parsing configuration files ignore all env vars besides those referenced via [env var substitution][]. This is a great starting point for transitioning from env var based configuration to file based configuration.
15
+
-[sdk-migration-config.yaml](./examples/sdk-migration-config.yaml): Includes env var substitution references to all [standard env vars](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md) which map cleanly to file configuration (see notes in the example for the set of env vars which are not referenced). Note, SDKs parsing configuration files ignore all env vars besides those referenced via [env var substitution][]. This is a great starting point for transitioning from env var based configuration to file based configuration.
16
16
-[sdk-config.yaml](./examples/sdk-config.yaml): Represents the typical default configuration. This is a good starting point if you are not using env var based configuration or wish to transition fully to file based configuration. Note, SDKs parsing configuration files ignore all env vars besides those referenced via [env var substitution][].
17
17
18
18
[env var substitution]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/file-configuration.md#environment-variable-substitution
@@ -63,3 +63,9 @@ When a property requires pattern matching, use wildcard `*` (match any number of
63
63
* Given `excluded: ["a*"]`: Match all except values starting with `a`.
64
64
* Given `included: ["a*", "b*"]`, `excluded: ["ab*"]`: Match any value starting with `a` or `b`, excluding values starting with `ab`.
65
65
* Given `included: ["a", "b"]`, `excluded: ["a"]`: Match values equal to `b`.
66
+
67
+
### Data modeling and environment variable substitution
68
+
69
+
Properties should be modeled using the most appropriate data structures and types to represent the information. This may result in a schema which doesn't support env var substitution for the [standard env vars](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md) where a type mismatch occurs. For example, the `OTEL_RESOURCE_ATTRIBUTES` env var is modeled as a string, consisting of a comma separated list of key-value pairs, which is not the natural way to model a mapping of key-value pairs in JSON schema.
70
+
71
+
In instances where there is a type mismatch between the JSON schema and equivalent standard env var, an alternative version of the property may be provided to resolve the mismatch. For example, resource attributes are configured at `.resource.attributes`, but `.resource.attributes_list` is available with a format matching that of `OTEL_RESOURCE_ATTRIBUTES`. Alternative properties are reserved for cases where there is a demonstrated need for platforms to be able to participate in configuration and there is no reasonable alternative.
Copy file name to clipboardExpand all lines: examples/kitchen-sink.yaml
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -406,14 +406,18 @@ tracer_provider:
406
406
407
407
# Configure resource for all signals.
408
408
resource:
409
-
# Configure resource attributes.
409
+
# Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.
410
410
#
411
411
# Environment variable: OTEL_RESOURCE_ATTRIBUTES
412
412
attributes:
413
413
# Configure `service.name` resource attribute
414
414
#
415
415
# Environment variable: OTEL_SERVICE_NAME
416
416
service.name: !!str "unknown_service"
417
+
# Configure resource attributes. Entries have lower priority than entries from .resource.attributes.
418
+
#
419
+
# The value is a list of comma separated key-value pairs, matching the format of OTEL_RESOURCE_ATTRIBUTES. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
# Configure resource attributes. Entries have lower priority than entries from .resource.attributes.
52
+
#
53
+
# The value is a list of comma separated key-value pairs, matching the format of OTEL_RESOURCE_ATTRIBUTES. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
54
+
attributes_list: ${OTEL_RESOURCE_ATTRIBUTES}
52
55
53
56
# Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits.
0 commit comments