Skip to content

Conversation

@codeboten
Copy link
Contributor

@codeboten codeboten commented Oct 16, 2025

This adds support for the first 1.0.0 release candidate of the OpenTelemetry configuration schema. The release candidate includes many breaking changes that were introduced in v0.4.0. I'm including the release notes for v0.4.0 in the description below.

The implementation steps:

  1. update OPENTELEMETRY_CONFIGURATION_JSONSCHEMA_VERSION to rc1, run make genjsonschema and commit the new generated code
  2. copy over v0.3.0 implementation and update it as needed
  3. added a test file with the kitchen-sink example and ensure the parsed output matches the input

I've added some TODOs to keep track of things that need to be implemented still. I'll open issues for these and include them in the comments in the code.

Fixes #7159

v0.4.0 release notes This release has a significant number of breaking changes, new additions and fixes. The breaking changes reflect a higher degree of scrutiny on consistency and correct data modeling as we approach a stable release ([#161](https://github.com/open-telemetry/opentelemetry-configuration/issues/161), [#4374](https://github.com/open-telemetry/opentelemetry-specification/issues/4374)). We anticipate limited churn going forward. Additionally, once we do have a stable release, users can rely on the [strong compatibility guarantees](https://github.com/open-telemetry/opentelemetry-configuration?tab=readme-ov-file#stability-definition) we'll conform to in versions 1.0.0+.

Schema

  • BREAKING: Refactor otlp exporter to separate otlp_http and otlp_grpc exporters, add _file suffix to OTLP exporter certificate properties (#146, #166)

    Migration steps
    # Before
    tracer_provider:
      processors:
        - batch:
            exporter:
              otlp: 
                protocol: http/protobuf
                endpoint: http://localhost:4318/v1/traces
                certificate: /app/cert.pem
    ---
    # After
    tracer_provider:
      processors:
        - batch:
            exporter:
              otlp_http: 
                endpoint: http://localhost:4318/v1/traces
                certificate_file: /app/cert.pem
  • BREAKING: Refactor propagator schema, add composite_list for compatibility with OTEL_PROPAGATORS. (#187)

    Migration steps
    # Before
    propagator:
      composite:
        - tracecontext
        - baggage
    ---
    # After
    propagator:
      composite:
        - tracecontext:
        - baggage:
  • BREAKING: Refactor resource detection and mark experimental (#182, #188)

    Migration steps
    # Before
    resource:
      attributes: # ...omitted for brevity
      detectors:
        excluded:
          - process.command_args
    ---
    # After
    resource:
      attributes: # ...omitted for brevity
      detection/development:
        detectors:
          - container:
          - host:
          - os:
          - process:
        attributes:
          excluded:
            - process.command_args
  • BREAKING: Mark prometheus exporter as experimental (#180)

    Migration steps
    # Before
    meter_provider:
      readers:
        - pull:
            prometheus: # ...omitted for brevity
    ---
    # After
    meter_provider:
      readers:
        - pull:
            prometheus/development: # ...omitted for brevity
  • BREAKING: Mark .instrumentation as experimental (#179)

    Migration steps
    # Before
    instrumentation: # ...omitted for brevity
    ---
    # After
    instrumentation/development: # ...omitted for brevity
  • BREAKING: Move metric producers from MetricReader to PullMetricReader, PeriodicMetricReader (#148)

    Migration steps
    # Before
    meter_provider:
      readers:
        - periodic: # ...omitted for brevity
          producers:
            - opencensus:
    ---
    # After
    meter_provider:
      readers:
        - periodic: # ...omitted for brevity
            producers:
              - opencensus:
  • BREAKING: Change various usages of minimum to exclusiveMinimum (#151)

  • Add .meter_provider.exemplar_filter property (#131)

  • Don't require empty objects (#134)

  • Improve .file_format documentation (#137)

  • Fix periodic exporter interval default value in kitchen-sink.yaml (#143)

  • Provide guidance on required and null properties. Update schema types to reflect guidance, including documenting behavior when properties are omitted or null. (#141, #192)

  • Add guidance around use of polymorphic types (#147)

  • Fix MetricProducer type descriptions (#150)

  • Add otlp_file/development exporter (#154, #181)

  • Object and enum types should be defined in $defs (#155)

  • Add guidance around use of title and description keywords (#157)

  • Add log_level configuration (#121)

  • Add missing gauge value to InstrumentType enum (#186)

  • Add cardinality limits configuration to PullMetricReader, PeriodicMetricReader (#185)

  • Add scope configuration to disable loggers, tracers, meters (#140, #191)

@codeboten
Copy link
Contributor Author

If it's helpful to reviewers, i'm happy to commit parts of this PR in separate PRs. i could get the change to add the generated code and the test yaml files separately to make reviewing it easier

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 92.18750% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.1%. Comparing base (9524af6) to head (5e66923).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
otelconf/config_yaml.go 86.1% 5 Missing and 5 partials ⚠️
otelconf/config_json.go 91.3% 4 Missing and 4 partials ⚠️
otelconf/config.go 97.1% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #8026     +/-   ##
=======================================
+ Coverage   81.8%   82.1%   +0.3%     
=======================================
  Files        194     195      +1     
  Lines      13377   13628    +251     
=======================================
+ Hits       10951   11199    +248     
+ Misses      2029    2027      -2     
- Partials     397     402      +5     
Files with missing lines Coverage Δ
otelconf/config_common.go 90.9% <100.0%> (+0.8%) ⬆️
otelconf/metric.go 90.8% <100.0%> (+3.4%) ⬆️
otelconf/trace.go 99.4% <100.0%> (ø)
otelconf/config.go 97.1% <97.1%> (ø)
otelconf/config_json.go 93.7% <91.3%> (+0.7%) ⬆️
otelconf/config_yaml.go 94.9% <86.1%> (-2.4%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MrAlias
Copy link
Contributor

MrAlias commented Oct 17, 2025

If it's helpful to reviewers, i'm happy to commit parts of this PR in separate PRs. i could get the change to add the generated code and the test yaml files separately to make reviewing it easier

That would be helpful 👍

@codeboten
Copy link
Contributor Author

Putting this back in draft, and starting the process to introduce changes in smaller prs #8026

@codeboten codeboten marked this pull request as draft October 17, 2025 14:26
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 17, 2025
This adds the v1.0.0-rc.2 test yaml from the config repo: https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/kitchen-sink.yaml and also adds the json translation of that yaml file.

To reviewers, I downloaded the file from the configuration schema repo and put it in the testdata folder. I then pasted the yaml into an online translation tool to produce the json.

Part of splitting open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
@codeboten codeboten force-pushed the codeboten/otelconf-v1.0.0-rc1 branch from ea91409 to bc3b986 Compare October 20, 2025 17:18
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 20, 2025
Copies the certificate data from the v0.3.0 directory into the 1.0.0 testdata.

Part of breaking up open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 21, 2025
Updates otelconf v1.0.0 to include unmarshaling that validates the fields for batch log processor and batch span processor configuration.

Part of splitting open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
@codeboten codeboten force-pushed the codeboten/otelconf-v1.0.0-rc1 branch from bc3b986 to a8757c2 Compare October 21, 2025 15:14
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 21, 2025
Updates otelconf v1.0.0 to include unmarshaling that validates the fields for batch log processor and batch span processor configuration.

Part of splitting open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 21, 2025
Adds unmarshaling code for TextMapPropagator which includes supporting nillable values for the different propagators.

Part of splitting open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 21, 2025
Non-functional refactor, moves common code to an internal package to remove need to replicate the code again with 1.0.0 implementation.

Part of splitting open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
@codeboten codeboten force-pushed the codeboten/otelconf-v1.0.0-rc1 branch 2 times, most recently from 958e356 to 29cee4c Compare October 23, 2025 20:13
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 23, 2025
Updates otelconf v1.0.0 to include unmarshaling that validates the fields for batch log processor and batch span processor configuration.

Part of splitting open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 23, 2025
Updates otelconf v1.0.0 to include unmarshaling that validates the fields for batch log processor and batch span processor configuration.

Part of splitting open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
@codeboten codeboten force-pushed the codeboten/otelconf-v1.0.0-rc1 branch from 29cee4c to cbc9045 Compare October 27, 2025 19:20
codeboten added a commit to codeboten/opentelemetry-go-contrib that referenced this pull request Oct 27, 2025
Adds unmarshaling code for TextMapPropagator which includes supporting nillable values for the different propagators.

Part of splitting open-telemetry#8026

Signed-off-by: alex boten <[email protected]>
Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is an RC of v1 I want to ask what is the design/plan regarding backwards compatiblity and stability.

For instance OpenTelemetryConfiguration has InstrumentationDevelopment field. Should it be exported? This does not seem to be a stable field.

Do we want we eventually want to have Instrumentation instead of InstrumentationDevelopment?

@codeboten
Copy link
Contributor Author

Given this is an RC of v1 I want to ask what is the design/plan regarding backwards compatiblity and stability.

For instance OpenTelemetryConfiguration has InstrumentationDevelopment field. Should it be exported? This does not seem to be a stable field.

Do we want we eventually want to have Instrumentation instead of InstrumentationDevelopment?

That's a good question! The plan for the schema v1 is to include experimental support for:

  • resource detection
  • instrumentation
  • otlp file exporter
  • configurators for each signal
  • prometheus exporter
  • various samplers configuration (composite, probability)

The stability guarantee around these are near none (https://github.com/open-telemetry/opentelemetry-configuration/tree/main?tab=readme-ov-file#experimental-features). We could decide to not support these in the implementation at this time.

Alternatively we could put these in an experimental module and only unmarshal anything marked with the /development suffix if an option is set (something like WithExperimentalFeatures)

Thoughts?

@codeboten
Copy link
Contributor Author

Followed up with @pellared on a call to discuss next steps. An idea to reduce the surface area for the API of otelconf was to not export the struct for the model directly. Instead we may be able to add WithX functions to support any changes needed. I'll take a look at what this would look like for the usage in the Collector.

On the call we also agreed that these changes can be implemented while the module itself is not at a v1.

@MrAlias

This comment was marked as resolved.

Signed-off-by: alex boten <[email protected]>
@MrAlias MrAlias merged commit 76c48fd into open-telemetry:main Nov 24, 2025
29 checks passed
@codeboten codeboten deleted the codeboten/otelconf-v1.0.0-rc1 branch November 24, 2025 19:27
@MrAlias MrAlias mentioned this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[config] Adopt configuration v0.4.0

7 participants