opentelemetry-collector
opentelemetry-collector copied to clipboard
[telemetry] Add log rotation support (#7352)
Description: Add log rotation support. The logs of otelcol itself will be rotated by lumberjack.
Link to tracking Issue: #7352
Testing: Creating logger with or without rotation, logging with rotation and logging with an old big file are added in unit tests.
I did some simple testing on Linux, macOS, and Windows.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: h0cheung / name: Howard Cheung (d0cc94f30a801422d9545606c3277925dd7fb918)
- :white_check_mark: login: djaglowski / name: Daniel Jaglowski (233cbf14e9d2769c21d5226d00c2d956c8559ffb)
This PR was marked stale due to lack of activity. It will be closed in 14 days.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
remove stale
Codecov Report
Attention: Patch coverage is 86.48649%
with 10 lines
in your changes missing coverage. Please review.
Project coverage is 92.35%. Comparing base (
e4a1f5b
) to head (233cbf1
). Report is 77 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
service/telemetry/logger.go | 81.25% | 6 Missing and 3 partials :warning: |
service/telemetry/factory.go | 0.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #7425 +/- ##
==========================================
- Coverage 92.53% 92.35% -0.18%
==========================================
Files 388 388
Lines 18317 18386 +69
==========================================
+ Hits 16949 16981 +32
- Misses 1022 1056 +34
- Partials 346 349 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I made some updates to pass windows-unittest
This PR was marked stale due to lack of activity. It will be closed in 14 days.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
remove stale
This PR was marked stale due to lack of activity. It will be closed in 14 days.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
remove stale
This PR was marked stale due to lack of activity. It will be closed in 14 days.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
remove stale
This PR was marked stale due to lack of activity. It will be closed in 14 days.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
remove stale
This PR was marked stale due to lack of activity. It will be closed in 14 days.
Closed as inactive. Feel free to reopen if this PR is still being worked on.
Did the log rotation ever make it into the code?
Did the log rotation ever make it into the code?
It did not, but it should in some form. Looks like #7425 still tracks it. cc: @BinaryFissionGames.
Hi @djaglowski I think log rotation is a necessary feature. Is there a plan to merge this PR? Or does this PR need to be perfected?
I agree @li-zeyuan.
@open-telemetry/collector-maintainers, any concerns in principle with adding log rotation?
From what I can tell this timed out after feedback was implemented, but not re-reivewed. @h0cheung are you willing to reopen this? @atoulme will you revisit your comments to confirm if they were addressed?
I agree @li-zeyuan.
@open-telemetry/collector-maintainers, any concerns in principle with adding log rotation?
From what I can tell this timed out after feedback was implemented, but not re-reivewed. @h0cheung are you willing to reopen this? @atoulme will you revisit your comments to confirm if they were addressed?
Yes. I'd like to continue the work if we can reopen this.
I agree @li-zeyuan. @open-telemetry/collector-maintainers, any concerns in principle with adding log rotation? From what I can tell this timed out after feedback was implemented, but not re-reivewed. @h0cheung are you willing to reopen this? @atoulme will you revisit your comments to confirm if they were addressed?
Yes. I'd like to continue the work if we can reopen this.
@h0cheung Hi brother, can you add repository permission to me? Coding together.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
I agree @li-zeyuan. @open-telemetry/collector-maintainers, any concerns in principle with adding log rotation? From what I can tell this timed out after feedback was implemented, but not re-reivewed. @h0cheung are you willing to reopen this? @atoulme will you revisit your comments to confirm if they were addressed?
Yes. I'd like to continue the work if we can reopen this.
@h0cheung Hi brother, can you add repository permission to me? Coding together.
Yes
This PR was marked stale due to lack of activity. It will be closed in 14 days.
@li-zeyuan, are you still planning to update this PR?
@li-zeyuan, are you still planning to update this PR?
There will be no time to update the PR in the next 2 months, but I will keep an eye on this feature.
@h0cheung if you'd be willing to grant me access I can update the PR.
@h0cheung if you'd be willing to grant me access I can update the PR.
Thank you so much. It's a bit troublesome for me to deal with the windows-unittest
without a Windows device.