Skip to content

Fix daemon log format config conversion#2524

Open
MrAlias wants to merge 1 commit into
open-telemetry:mainfrom
MrAlias:conv-bug-log-fmt
Open

Fix daemon log format config conversion#2524
MrAlias wants to merge 1 commit into
open-telemetry:mainfrom
MrAlias:conv-bug-log-fmt

Conversation

@MrAlias

@MrAlias MrAlias commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • The v1-to-v2 conversion was populating daemon.logging.format from LogConfig instead of LogFormat, causing converted configs to lose the intended log output format.
  • The change preserves the semantic split where LogFormat controls text vs JSON output and LogConfig controls startup configuration logging.

Description

  • Export conversion now writes daemon.logging.format from cfg.LogFormat and maps cfg.LogConfig to the shorter daemon.logging.config_format field (internal/config/convert/export.go).
  • Import conversion now maps daemon.logging.format and daemon.logging.config_format back into the runtime logging settings for both full and partial daemon conversions (internal/config/convert/import.go).
  • The v2 daemon logging schema accepts text and json log output formats, plus yaml and json startup configuration logging formats (internal/config/schema/daemon.go).
  • Tests, docs, schema artifacts, the parity checker, and the v2 default example were updated to reflect the proper logging mapping and terminology.

Testing

  • go test ./internal/config/convert ./internal/config/schema
  • go test ./pkg/ebpf/common
  • python3 devdocs/config/version-2.0/validate_example.py --config devdocs/config/version-2.0/examples/default-configuration.yaml
  • make lint-markdown

@MrAlias MrAlias added the bug Something isn't working label Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.34%. Comparing base (b9fe20e) to head (24daf72).

Files with missing lines Patch % Lines
internal/config/convert/export.go 88.88% 2 Missing ⚠️
internal/config/convert/import.go 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2524      +/-   ##
==========================================
+ Coverage   69.07%   69.34%   +0.27%     
==========================================
  Files         348      348              
  Lines       47314    47351      +37     
==========================================
+ Hits        32683    32837     +154     
+ Misses      12582    12455     -127     
- Partials     2049     2059      +10     
Flag Coverage Δ
integration-test 50.46% <ø> (-0.40%) ⬇️
integration-test-arm 28.17% <ø> (+1.87%) ⬆️
integration-test-vm-5.15-lts ?
integration-test-vm-6.18-lts ?
k8s-integration-test 35.57% <ø> (-0.61%) ⬇️
oats-test 35.49% <ø> (-0.09%) ⬇️
unittests 63.59% <93.75%> (+0.04%) ⬆️

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 marked this pull request as ready for review June 26, 2026 22:07
@MrAlias MrAlias requested a review from a team as a code owner June 26, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant