From 2227767f049ff77b6a840948bf5a91ef151519df Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Fri, 1 Nov 2024 01:37:34 +0100 Subject: [PATCH] Improved file_format documentation. --- examples/kitchen-sink.yaml | 4 +++- examples/sdk-config.yaml | 4 +++- examples/sdk-migration-config.yaml | 6 ++++-- schema/type_descriptions.yaml | 9 +++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/examples/kitchen-sink.yaml b/examples/kitchen-sink.yaml index b4c73f3..acb53ae 100644 --- a/examples/kitchen-sink.yaml +++ b/examples/kitchen-sink.yaml @@ -6,6 +6,8 @@ # Configuration values are set to their defaults when default values are defined. # The file format version. +# The yaml format is documented at +# https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema file_format: "0.3" # 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: # Configure resource for all signals. resource: # Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - # 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. + # Entries must contain .name and .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. attributes: - name: service.name value: unknown_service diff --git a/examples/sdk-config.yaml b/examples/sdk-config.yaml index df40a11..9bc3673 100644 --- a/examples/sdk-config.yaml +++ b/examples/sdk-config.yaml @@ -6,6 +6,8 @@ # vars defined in https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/. # The file format version. +# The yaml format is documented at +# https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema file_format: "0.3" # 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 # Configure resource for all signals. resource: # Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - # 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. + # Entries must contain .name and .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. attributes: - name: service.name value: unknown_service diff --git a/examples/sdk-migration-config.yaml b/examples/sdk-migration-config.yaml index f1d698a..5f14d26 100644 --- a/examples/sdk-migration-config.yaml +++ b/examples/sdk-migration-config.yaml @@ -34,7 +34,9 @@ # - OTEL_EXPORTER_OTLP_COMPRESSION # - OTEL_EXPORTER_OTLP_TIMEOUT -# The file format version The file format version. +# The file format version. +# The yaml format is documented at +# https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema file_format: "0.3" # 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} # Configure resource for all signals. resource: # Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - # 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. + # Entries must contain .name and .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. attributes: - name: service.name value: ${OTEL_SERVICE_NAME:-unknown_service} diff --git a/schema/type_descriptions.yaml b/schema/type_descriptions.yaml index 12ea1ab..e5d269d 100644 --- a/schema/type_descriptions.yaml +++ b/schema/type_descriptions.yaml @@ -13,7 +13,12 @@ # START OpenTelemetryConfiguration - type: OpenTelemetryConfiguration property_descriptions: - file_format: The file format version. + file_format: > + The file format version. + + The yaml format is documented at + + https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema 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. resource: Configure resource for all signals. propagator: Configure text map context propagators. @@ -30,7 +35,7 @@ attributes: > Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - 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. + Entries must contain .name and .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. attributes_list: > Configure resource attributes. Entries have lower priority than entries from .resource.attributes.