Skip to content

Enable Config v2 in the OBI receiver#2681

Merged
grcevski merged 5 commits into
open-telemetry:mainfrom
MrAlias:agent/config-v2-receiver
Jul 20, 2026
Merged

Enable Config v2 in the OBI receiver#2681
grcevski merged 5 commits into
open-telemetry:mainfrom
MrAlias:agent/config-v2-receiver

Conversation

@MrAlias

@MrAlias MrAlias commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Parse receiver-embedded Config v2 through the shared schema and runtime conversion packages.
  • Preserve legacy receiver configuration by falling back to v1 only when the input is conclusively not Config v2.
  • Reject standalone Config v2 envelopes and the enrich, correlation, and daemon sections with actionable receiver-mode errors.
  • Cover trace-only, metric-only, and combined pipelines, and exercise Config v2 through an OCB-built Collector runtime smoke test.

Context

This completes the Collector receiver release-gate portion of #2251 using the self-contained receiver contract resolved in #2211. Collector pipelines remain authoritative, and this change does not create or publish a Collector distribution.

Closes #2536

Testing

  • make docker-generate
  • go test -v -p 2 -timeout 2m ./collector/...
  • go test -v -p 2 -timeout 2m ./internal/config/...
  • go test -short -p 2 ./...
  • make compile
  • make license-header-check
  • make check-config-v2-artifacts
  • make lint-markdown
  • Linux/arm64 and Darwin/amd64 Collector cross-builds
  • OCB v0.151.0 build and validation of config.yaml and smoke-config.yaml
  • Privileged OCB runtime smoke with a live HTTP service and OBI trace assertion

Parse receiver-embedded Config v2 through the shared schema and runtime
conversion packages while retaining the legacy receiver decoder for v1
configurations.

Reject standalone-only sections and prevent malformed or unsupported v2
input from falling back to v1. Cover each Collector signal pipeline shape
and validate the Config v2 example with its OCB-built Collector.
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.52%. Comparing base (3c17808) to head (ab4fda1).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
collector/config_linux.go 69.69% 5 Missing and 5 partials ⚠️
collector/factory_linux.go 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2681      +/-   ##
==========================================
+ Coverage   69.24%   69.52%   +0.27%     
==========================================
  Files         353      354       +1     
  Lines       48858    49094     +236     
==========================================
+ Hits        33834    34132     +298     
+ Misses      12897    12827      -70     
- Partials     2127     2135       +8     
Flag Coverage Δ
integration-test 50.05% <ø> (-0.08%) ⬇️
integration-test-arm 26.66% <ø> (+0.65%) ⬆️
integration-test-vm-5.15-lts ?
integration-test-vm-6.18-lts ?
k8s-integration-test 34.79% <ø> (-0.36%) ⬇️
oats-test 34.93% <ø> (-0.07%) ⬇️
unittests 64.98% <77.77%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

MrAlias added 4 commits July 15, 2026 12:07
Treat an extensions.obi envelope as an explicit v2 layout error in
receiver mode. This prevents mixed migration configs from falling back to
v1 and silently ignoring the requested v2 configuration.
Run a privileged OCB-built Collector against a live HTTP server and a
Config v2 fixture. Wait for the OBI HTTP span so CI covers receiver
startup, shared trace and metric pipelines, instrumentation, and export.
Mark the new Collector smoke helper with the repository's Apache 2.0
license header so the generated-files and repo-hygiene check accepts it.
Detect standalone-only Config v2 sections before classifying a
configuration as legacy. This prevents migration configurations from
silently discarding enrich, correlation, or daemon settings.

Cover explicit v2 input and mixed legacy-selector input at the schema
and Collector configuration boundaries.
@MrAlias MrAlias added this to the v0.11.0 milestone Jul 15, 2026
@MrAlias
MrAlias marked this pull request as ready for review July 15, 2026 21:37
@MrAlias
MrAlias requested a review from a team as a code owner July 15, 2026 21:37

@mariomac mariomac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great! If I understand well, OBI in the Collector is only going to support V2 config, right?

@grcevski grcevski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@grcevski
grcevski merged commit 9be8a28 into open-telemetry:main Jul 20, 2026
114 of 115 checks passed
@MrAlias
MrAlias deleted the agent/config-v2-receiver branch July 20, 2026 15:08
@MrAlias

MrAlias commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Looks great! If I understand well, OBI in the Collector is only going to support V2 config, right?

Thanks! V2 is the recommended configuration for the Collector going forward, but this PR deliberately retains support for the legacy receiver configuration for backward compatibility. We try V2 first, and fall back to the legacy format only when the input is clearly not V2; invalid or unsupported V2 config still fails rather than silently falling back. Any V1 deprecation would be a separate decision.

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.

Enable Config v2 in the existing OBI Collector receiver

3 participants