Skip to content

Import v2 enrichment config#2468

Merged
MrAlias merged 3 commits into
open-telemetry:mainfrom
MrAlias:codex/config-v2-import-enrich
Jun 26, 2026
Merged

Import v2 enrichment config#2468
MrAlias merged 3 commits into
open-telemetry:mainfrom
MrAlias:codex/config-v2-import-enrich

Conversation

@MrAlias

@MrAlias MrAlias commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Depends on #2462

Summary

  • Import standalone enrich.attributes into runtime attribute settings.
  • Import enrich.enrichers.kubernetes fields exported by RuntimeToV2.
  • Add focused round-trip and default-preservation tests for enrichment import parity.

Validation

  • make generate
  • go test ./internal/config/...
  • go test ./cmd/check-config-v2-parity
  • make check-config-v2-parity

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.41353% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.10%. Comparing base (914ffa4) to head (43e460a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/config/convert/import.go 63.63% 26 Missing and 14 partials ⚠️
internal/config/convert/enrich.go 70.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2468      +/-   ##
==========================================
- Coverage   69.24%   69.10%   -0.15%     
==========================================
  Files         345      347       +2     
  Lines       46747    46879     +132     
==========================================
+ Hits        32372    32396      +24     
- Misses      12330    12421      +91     
- Partials     2045     2062      +17     
Flag Coverage Δ
integration-test 51.52% <ø> (+0.60%) ⬆️
integration-test-arm 27.18% <ø> (-1.13%) ⬇️
integration-test-vm-5.15-lts ?
integration-test-vm-6.18-lts ?
k8s-integration-test 35.82% <ø> (+0.12%) ⬆️
oats-test 35.22% <ø> (-0.14%) ⬇️
unittests 63.31% <65.41%> (+<0.01%) ⬆️

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 MrAlias force-pushed the codex/config-v2-import-enrich branch 2 times, most recently from 7fe7fdc to c51b093 Compare June 25, 2026 15:51
@MrAlias MrAlias marked this pull request as ready for review June 25, 2026 17:36
@MrAlias MrAlias requested a review from a team as a code owner June 25, 2026 17:36
Comment thread internal/config/convert/import.go Outdated
Comment thread internal/config/convert/import.go Outdated
Comment thread internal/config/convert/import.go Outdated
MrAlias and others added 3 commits June 26, 2026 07:48
Apply standalone v2 enrich attributes and Kubernetes enricher settings back into the runtime config so exported documents preserve enrichment behavior when imported.

The importer now clones attribute selections, extra group attributes, and Kubernetes label maps to keep the schema object isolated from runtime state while preserving defaults for missing sections.
Map Kubernetes enricher mode through the v2 enum so exported configs
emit enabled and disabled while runtime config still receives true and
false.

Preserve exported zero values for metadata retry timeout and Kubernetes
informer resync period during v2 import. The tests now cover those round
trips while keeping empty enrich sections on the runtime defaults.
Include the package import comment on the new enrich converter helper so
porto accepts it during the lint workflow.

The previous commit added the file without the vanity import marker, which
caused the PR lint job to fail before the rest of lint could run cleanly.
@MrAlias MrAlias force-pushed the codex/config-v2-import-enrich branch from 0a86ed7 to 43e460a Compare June 26, 2026 14:48

@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!

@MrAlias MrAlias merged commit b9fe20e into open-telemetry:main Jun 26, 2026
111 of 112 checks passed
@MrAlias MrAlias deleted the codex/config-v2-import-enrich branch June 26, 2026 19:58
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.

2 participants