Skip to content

Conversation

@codeboten
Copy link
Contributor

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.

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 91.90283% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.0%. Comparing base (79904a3) to head (577d0d2).

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.0%   +0.2%     
=======================================
  Files        194     195      +1     
  Lines      13362   13604    +242     
=======================================
+ Hits       10931   11168    +237     
+ Misses      2033    2032      -1     
- Partials     398     404      +6     
Files with missing lines Coverage Δ
otelconf/config_common.go 90.9% <100.0%> (+0.8%) ⬆️
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%) ⬇️

... and 1 file with indirect coverage changes

🚀 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]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
Signed-off-by: alex boten <[email protected]>
@MrAlias MrAlias added this to the v1.39.0 milestone Nov 6, 2025
Signed-off-by: alex boten <[email protected]>
@codeboten codeboten force-pushed the codeboten/otelconf-v1.0.0-rc1 branch from fc36b38 to 8d05a12 Compare November 6, 2025 21:12
Signed-off-by: alex boten <[email protected]>
@codeboten codeboten marked this pull request as ready for review November 6, 2025 23:05
@codeboten codeboten force-pushed the codeboten/otelconf-v1.0.0-rc1 branch from ad72c12 to 4d46bf6 Compare November 7, 2025 18:16
@codeboten codeboten requested a review from dashpole as a code owner November 7, 2025 18:16
@codeboten codeboten force-pushed the codeboten/otelconf-v1.0.0-rc1 branch from 4d46bf6 to e10a1b2 Compare November 7, 2025 18:42
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.

3 participants