Skip to content

[config] Disable tracer/meter/logger providers by default #6129

@JamieDanielson

Description

@JamieDanielson

Similarly, though this may be a separate discussion, I think the current behaviour that ConfigurationModel has default values for many settings is also a bug. Relatively recently I noticed this was added: https://github.com/open-telemetry/opentelemetry-configuration/blob/main/CONTRIBUTING.md#what-you-see-is-what-you-get
(Added in open-telemetry/opentelemetry-configuration#377)

I believe the intention is that if a declarative config YAML does not have a section for a part of the config, then the config model should not have anything for that section. For example this config:

file_format: '1.0-rc.1'
logger_provider:
  processors:
    - batch:
        exporter:
          otlp_http:
            endpoint: ${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-http://localhost:4318/v1/logs}

currently results in a ConfigurationModel with tracer provider and meter provider blocks, but I think it should not.

Originally posted by @trentm in #6044 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions