Closed
Description
Component(s)
pkg/stanza
What happened?
Description
I'm seeing strange behavior when I use the container parser chained with a regex parser that sometimes fails (because the regex is not always present in the log). When the regex_parser
fails, logs collection stops. I believe this is because the container parser currently breaks out of the crioConsumer
goroutine if the Write
returns an error:
Steps to Reproduce
Use a filelogreceiver config such as
filelog:
exclude: []
include:
- /var/log/pods/*/*/*.log
include_file_name: false
include_file_path: true
operators:
- id: container-parser
max_log_size: 102400
type: container
- type: regex_parser
regexp: '\slevel=(?P<severity_field>\w+)\s'
on_error: send_quiet
severity:
parse_from: attributes.severity_field
retry_on_failure:
enabled: true
start_at: end
Send through a log that does not match the regex parser and then send through a log that does match.
Expected Result
Both logs are sent, with the second having a severity set.
Actual Result
Neither logs are sent.
Collector version
v0.105.0
Environment information
No response
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response