Enable Config v2 in the OBI receiver#2681
Conversation
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 Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
mariomac
left a comment
There was a problem hiding this comment.
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. |
Summary
enrich,correlation, anddaemonsections with actionable receiver-mode errors.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-generatego test -v -p 2 -timeout 2m ./collector/...go test -v -p 2 -timeout 2m ./internal/config/...go test -short -p 2 ./...make compilemake license-header-checkmake check-config-v2-artifactsmake lint-markdownconfig.yamlandsmoke-config.yaml