-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[service]: add new subcommand to examine the initial configuration #11775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (90.32%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #11775 +/- ##
==========================================
- Coverage 92.18% 92.18% -0.01%
==========================================
Files 465 466 +1
Lines 25275 25306 +31
==========================================
+ Hits 23301 23329 +28
- Misses 1575 1577 +2
- Partials 399 400 +1 ☔ View full report in Codecov by Sentry. |
otelcol/command_examine.go
Outdated
if err != nil { | ||
return fmt.Errorf("error while marshaling to yaml: %w", err) | ||
} | ||
log.Printf("\n%s", b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change to fmt.Printf here? This output is likely to be piped/redirected and I would rather not have a random timestamp at the start of the output.
Reviewed again, LGTM. Thanks for adding a test to check the tool output. |
cc @open-telemetry/collector-approvers This PR adds a new experimental (under a feature gate) subcommand to examine the initial configuration. I will merge this PR in one week if there are no further comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @VihasMakwana! This looks good, I mostly have copyediting notes. The most important one is that we should describe how to use this in the changelog.
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
@VihasMakwana it looks like you have a few failing checks and tests, could you take a look at those? |
@VihasMakwana Sorry for the churn, needs a |
@VihasMakwana I will merge this after you have fixed the merge conflicts! |
@mx-psi I've rebased main. Once CI is good, this can be merged. |
d6d07c8
Description
Why is this useful?
--config
sources.Usage
Link to tracking issue
Fixes ##11479
Testing
Added unit test cases.
Documentation
Updated readme.