-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fileexporter rotation breaks up log lines #22747
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@peterzandbergen hello,Peter.Are you interested in submitting a pull request to fix this bug? |
Hi Luke, |
Thank you very much for your contribution~ |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
exporter/file
What happened?
Description
When rotation is configured the rotation does not occur on line ends.
Steps to Reproduce
Expected Result
The logfiles produced by the file exporter should contain valid json structs
Actual Result
The last line ends in the middle of the last json struct
Collector version
85a618f
Environment information
Environment
Distributor ID: Pop
Description: Pop!_OS 22.04 LTS
Release: 22.04
Codename: jammy
Compiler(if manually compiled): (e.g., "go 14.2")
go version go1.20.4 linux/amd64
OpenTelemetry Collector configuration
Log output
No response
Additional context
I have analyzed the error and it was introduced by my contribution for flushing the file exporter.
I have also managed to fix it by not wrapping the buffered writer around the lumberjack logger.
The text was updated successfully, but these errors were encountered: