Skip to content

Commit e1f89ef

Browse files
authored
Improved file_format documentation (#137)
1 parent e196026 commit e1f89ef

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
* Improved file_format documentation. [#137](https://github.com/open-telemetry/opentelemetry-configuration/pull/137)
6+
57
## [v0.3.0] - 2024-05-08
68

79
* Add metric producers to meter_provider configuration. [#90](https://github.com/open-telemetry/opentelemetry-configuration/pull/90)

examples/kitchen-sink.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# Configuration values are set to their defaults when default values are defined.
77

88
# The file format version.
9+
# The yaml format is documented at
10+
# https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema
911
file_format: "0.3"
1012

1113
# Configure if the SDK is disabled or not. This is not required to be provided to ensure the SDK isn't disabled, the default value when this is not provided is for the SDK to be enabled.
@@ -323,7 +325,7 @@ tracer_provider:
323325
# Configure resource for all signals.
324326
resource:
325327
# Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.
326-
# Entries must contain .name nand .value, and may optionally include .type, which defaults ot "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.
328+
# Entries must contain .name and .value, and may optionally include .type, which defaults to "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.
327329
attributes:
328330
- name: service.name
329331
value: unknown_service

examples/sdk-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# vars defined in https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/.
77

88
# The file format version.
9+
# The yaml format is documented at
10+
# https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema
911
file_format: "0.3"
1012

1113
# Configure if the SDK is disabled or not. This is not required to be provided to ensure the SDK isn't disabled, the default value when this is not provided is for the SDK to be enabled.
@@ -14,7 +16,7 @@ disabled: false
1416
# Configure resource for all signals.
1517
resource:
1618
# Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.
17-
# Entries must contain .name nand .value, and may optionally include .type, which defaults ot "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.
19+
# Entries must contain .name and .value, and may optionally include .type, which defaults to "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.
1820
attributes:
1921
- name: service.name
2022
value: unknown_service

examples/sdk-migration-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
# - OTEL_EXPORTER_OTLP_COMPRESSION
3535
# - OTEL_EXPORTER_OTLP_TIMEOUT
3636

37-
# The file format version The file format version.
37+
# The file format version.
38+
# The yaml format is documented at
39+
# https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema
3840
file_format: "0.3"
3941

4042
# Configure if the SDK is disabled or not. This is not required to be provided to ensure the SDK isn't disabled, the default value when this is not provided is for the SDK to be enabled.
@@ -43,7 +45,7 @@ disabled: ${OTEL_SDK_DISABLED:-false}
4345
# Configure resource for all signals.
4446
resource:
4547
# Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.
46-
# Entries must contain .name nand .value, and may optionally include .type, which defaults ot "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.
48+
# Entries must contain .name and .value, and may optionally include .type, which defaults to "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.
4749
attributes:
4850
- name: service.name
4951
value: ${OTEL_SERVICE_NAME:-unknown_service}

schema/type_descriptions.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
# START OpenTelemetryConfiguration
1414
- type: OpenTelemetryConfiguration
1515
property_descriptions:
16-
file_format: The file format version.
16+
file_format: >
17+
The file format version.
18+
19+
The yaml format is documented at
20+
21+
https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema
1722
disabled: Configure if the SDK is disabled or not. This is not required to be provided to ensure the SDK isn't disabled, the default value when this is not provided is for the SDK to be enabled.
1823
resource: Configure resource for all signals.
1924
propagator: Configure text map context propagators.
@@ -30,7 +35,7 @@
3035
attributes: >
3136
Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.
3237
33-
Entries must contain .name nand .value, and may optionally include .type, which defaults ot "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.
38+
Entries must contain .name and .value, and may optionally include .type, which defaults to "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.
3439
attributes_list: >
3540
Configure resource attributes. Entries have lower priority than entries from .resource.attributes.
3641

0 commit comments

Comments
 (0)