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 (649fe5ec4f00625efd792cdf31439104f5f7c05f)
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 87.32394%
with 9 lines
in your changes are missing coverage. Please review.
Project coverage is 91.63%. Comparing base (
671dcbc
) to head (649fe5e
).
Files | Patch % | Lines |
---|---|---|
service/telemetry/telemetry.go | 80.00% | 6 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #7425 +/- ##
==========================================
- Coverage 91.65% 91.63% -0.02%
==========================================
Files 356 357 +1
Lines 16843 16914 +71
==========================================
+ Hits 15437 15499 +62
- Misses 1063 1069 +6
- Partials 343 346 +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