# kitchen-sink.yaml demonstrates all configurable surface area, including explanatory comments.
#
# It DOES NOT represent expected real world configuration, as it makes strange configuration
# choices in an effort to exercise the full surface area.
#
# Configuration values are set to their defaults when default values are defined.

# The file format version.
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.
disabled: ${OTEL_SDK_DISABLED}

# Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits.
attribute_limits:
  # Configure max attribute value size.
  attribute_value_length_limit: ${OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT}
  # Configure max attribute count.
  attribute_count_limit: 128

# 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.
  attributes:
    - name: service.name
      value: unknown_service
    - name: string_key
      value: value
      type: string
    - name: bool_key
      value: true
      type: bool
    - name: int_key
      value: 1
      type: int
    - name: double_key
      value: 1.1
      type: double
    - name: string_array_key
      value: [ "value1", "value2" ]
      type: string_array
    - name: bool_array_key
      value: [ true, false ]
      type: bool_array
    - name: int_array_key
      value: [ 1, 2 ]
      type: int_array
    - name: double_array_key
      value: [ 1.1, 2.2 ]
      type: double_array
    - name: string_value
      value: ${STRING_VALUE}
      type: string
    - name: bool_value
      value: ${BOOL_VALUE}
      type: bool
    - name: int_value
      value: ${INT_VALUE}
      type: int
    - name: float_value
      value: ${FLOAT_VALUE}
      type: double
    - name: hex_value
      value: ${HEX_VALUE}
      type: int
    - name: quoted_string_value
      value: "${STRING_VALUE}"
      type: string
    - name: quoted_bool_value
      value: "${BOOL_VALUE}"
      type: string
    - name: quoted_int_value
      value: "${INT_VALUE}"
      type: string
    - name: quoted_float_value
      value: "${FLOAT_VALUE}"
      type: string
    - name: quoted_hex_value
      value: "${HEX_VALUE}"
      type: string
    - name: alternative_env_syntax
      value: "${env:STRING_VALUE}"
      type: string
    - name: invalid_map_value
      value: "${INVALID_MAP_VALUE}"
      type: string
    - name: multiple_references_inject
      value: foo ${STRING_VALUE} ${FLOAT_VALUE}
      type: string
    - name: undefined_key
      value: ${UNDEFINED_KEY}
      type: string
    - name: undefined_key_fallback
      value: ${UNDEFINED_KEY:-fallback}
      type: string
    - name: ${ENV_VAR_IN_KEY}
      value: "value"
      type: string
    - name: replace_me
      value: ${REPLACE_ME}
      type: string
    - name: undefined_defaults_to_var
      value: ${UNDEFINED_KEY:-${STRING_VALUE}}
      type: string
    - name: escaped_does_not_substitute
      value: $${STRING_VALUE}
      type: string
    - name: escaped_does_not_substitute_fallback
      value: $${STRING_VALUE:-fallback}
      type: string
    - name: escaped_and_substituted_fallback
      value: $${STRING_VALUE:-${STRING_VALUE}}
      type: string
    - name: escaped_and_substituted
      value: $$${STRING_VALUE}
      type: string
    - name: multiple_escaped_and_not_substituted
      value: $$$${STRING_VALUE}
      type: string
    - name: undefined_key_with_escape_sequence_in_fallback
      value: ${UNDEFINED_KEY:-$${UNDEFINED_KEY}}
      type: string
    - name: value_with_escape
      value: ${VALUE_WITH_ESCAPE}
      type: string
    - name: escape_sequence
      value: a $$ b
      type: string
    - name: no_escape_sequence
      value: a $ b
      type: string
  # Configure resource attributes. Entries have lower priority than entries from .resource.attributes.
  # 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.
  attributes_list: "service.namespace=my-namespace,service.version=1.0.0"
  # Configure resource detectors.
  detectors:
    # Configure attributes provided by resource detectors.
    attributes:
      # Configure list of attribute key patterns to include from resource detectors. If not set, all attributes are included.
      # Attribute keys from resource detectors are evaluated to match as follows:
      #  * If the value of the attribute key exactly matches.
      #  * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
      included:
        - process.*
      # Configure list of attribute key patterns to exclude from resource detectors. Applies after .resource.detectors.attributes.included (i.e. excluded has higher priority than included).
      # Attribute keys from resource detectors are evaluated to match as follows:
      #  * If the value of the attribute key exactly matches.
      #  * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
      excluded:
        - process.command_args
  # Configure resource schema URL.
  schema_url: https://opentelemetry.io/schemas/1.16.0
