-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Respect telemetry configuration when running as a Windows service #9726
Respect telemetry configuration when running as a Windows service #9726
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9726 +/- ##
=======================================
Coverage 90.99% 90.99%
=======================================
Files 353 353
Lines 18635 18636 +1
=======================================
+ Hits 16957 16958 +1
Misses 1352 1352
Partials 326 326 ☔ View full report in Codecov by Sentry. |
Contrib test failure is related to
more at the link above. |
Unrelated failure: https://github.com/open-telemetry/opentelemetry-collector/actions/runs/8235184573/job/22518707884?pr=9726#step:4:975:~:text=%23%20github.com/open,977
|
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.
LGTM! Thanks @pjanotti
I'm volunteering myself to own the tier 2 support for windows/amd64. This will put the windows/amd64 on par with the other tier 2 platforms by having a specific person owning it. Some of Windows related things that I contribute(d): * Codeowner of various Windows related components in contrib (pkg/winperfcounters, activedirectorydsreceiver, iisreceiver, windowseventlogreceiver, and windowsperfcountersreceiver) * Fixing Windows related issues (e.g.: #9042, #9689, #9726, open-telemetry/opentelemetry-collector-contrib#30743) * MSI on the collector releases repo (open-telemetry/opentelemetry-collector-releases#560)
Description:
Fixes #5300
With this change the service telemetry section is respected by the collector when running as a Windows service. Log lever can be used to control the verbosity of the events logged and the logger can be redirected to a file by specifying an output path on the service telemetry config. By default
stdout
andstderr
are redirected to the event log when running as a Windows service to keep the current behavior.The code change itself was made with a focus of not breaking the public APIs and not reading the config more than once. That said it is probably something to be refactored when the public APIs can be touched again.
Link to tracking Issue:
#5300
Testing:
The test is an integration test that depends on the actual executable. It checks for event publication and file output.