# otel-getting-started.yaml is a good starting point for configuring the SDK, including exporting to # localhost via OTLP. # # NOTE: With the exception of env var substitution syntax (i.e. ${MY_ENV}), SDKs ignore # environment variables when interpreting config files. This including ignoring all env # vars defined in https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/. # # For schema documentation, including required properties, semantics, default behavior, etc, # see: https://opentelemetry.io/docs/specs/otel-config/types/ file_format: "1.1" resource: # Read resource attributes from the OTEL_RESOURCE_ATTRIBUTES environment variable. # This aligns well with the OpenTelemetry Operator and other deployment methods. attributes_list: ${OTEL_RESOURCE_ATTRIBUTES} detection/development: # /development properties may not be supported in all SDKs detectors: - service: # will add "service.instance.id" and "service.name" from the OTEL_SERVICE_NAME env var - host: - process: - container: propagator: composite: - tracecontext: - baggage: # Read backend endpoint from the OTEL_EXPORTER_OTLP_ENDPOINT environment variable. # This aligns well with the OpenTelemetry Operator and other deployment methods. tracer_provider: sampler: parent_based: root: always_on: processors: - batch: exporter: otlp_http: endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/traces meter_provider: readers: - periodic: exporter: otlp_http: endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/metrics logger_provider: processors: - batch: exporter: otlp_http: endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/logs