-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[receiver/syslog] Syslog Receiver fails to parse long messages, even with a max_log_size
set
#33182
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
max_log_length
set
max_log_length
setmax_log_size
set
As far as I understand that part, the parser has no option the pass the opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog/parser.go Lines 29 to 36 in 902d846
Looking at this construction part non of those takes a maxsize into account. opentelemetry-collector-contrib/pkg/stanza/operator/parser/syslog/parser.go Lines 88 to 113 in 902d846
The used version of |
I looked into this further and found that go-syslog justifies the hard limit based on |
@djaglowski considering that that repo has been archived, would it make sense to fork it here? |
Actually I'm happy to see that the original author has recently created a fork and is making updates again! We should definitely switch in my opinion. https://github.com/leodido/go-syslog. |
If I'm reading this correctly, the v4 release from leodido/go-syslog allows us to fix this issue, as it contains the |
PR switching the dependency to the fork: #33205. |
Component(s)
receiver/syslog
What happened?
Description
When using the syslog receiver, we can only parse messages up to the default maximum length (8192 octets), even with a
max_log_size
set much higher.Steps to Reproduce
max_log_size
of 100MiB)message too long to parse. was size 40366, max length 8192
Expected Result
The message should parse properly
Actual Result
The message fails to parse
Collector version
v0.100.0
Environment information
Environment
OS: Debian Bookworm
OpenTelemetry Collector configuration
Log output
Additional context
This seems to be because we aren't parsing a value into here: https://github.com/influxdata/go-syslog/blob/66067a10754ae90b9540d5312989ae685413c4fe/octetcounting/parser.go#L46 so we get stuck with the default limit
The text was updated successfully, but these errors were encountered: