You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuring the header option for the File Log receiver together with include_file_record_number causes the reported record numbers to be higher than they should be. This happens even when there are no header lines in the file.
Component(s)
receiver/filelog
What happened?
Description
Configuring the
header
option for the File Log receiver together withinclude_file_record_number
causes the reported record numbers to be higher than they should be. This happens even when there are no header lines in the file.Steps to Reproduce (input file with header)
Prepare input file
Run the collector with the below config
otelcol-contrib --config config.yaml
Expected Result
I would expect the "my-log" log to have
log.file.record_number
equal to1
.Actual Result
The log has
log.file.record_number
equal to3
.The output from Debug exporter shows the following log:
my-log log.file.name=logs.txt log.file.record_number=3 headerattr=xyz
Steps to Reproduce (input file without header)
Prepare input file
Run the collector with the below config
otelcol-contrib --config config.yaml
Expected Result
I would expect the "my-log" log to have
log.file.record_number
equal to1
.Actual Result
The log has
log.file.record_number
equal to2
.The output from Debug exporter shows the following log:
my-log log.file.name=logs.txt log.file.record_number=2
Collector version
v0.111.0
Environment information
No response
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: