-
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
syslog exporter does not format structured data with multiple fields properly #33300
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Thank you for reporting this issue @peffis. Looking at the examples you linked, this issue looks valid to me. @kkujawa-sumo @rnishtala-sumo do you agree? Looking at the tests, it seems they don't cover the case with more than one structured data element. This should be fixed, the examples from the RFC could be used for the test cases. @peffis Would you be open to submitting a fix for this? No worries if not, just checking. |
Sorry, but I cannot formally be a contributor to the project right now other than reporting issues. |
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. |
@andrzej-stencel yes this does look like a bug. Open to any contributions or will work on it myself. |
Component(s)
exporter/syslog
What happened?
Description
In the case when you have several fields in the "attributes.structured_data" object, the resulting syslog entry will not be formatted properly according to RFC5424 (see examples here for instance: https://datatracker.ietf.org/doc/html/rfc5424#section-6.3.5)
Steps to Reproduce
Receive a log record with an attributes.structured_data with more than one field, such as for instance
Expected Result
A syslog entry with one block per structured_data field, like so:
Actual Result
Instead the exporter builds only one array (here: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/syslogexporter/rfc5424_formatter.go#L72) which it does fmt.Sprint on, so end result looks like so instead:
Collector version
816b1f9
Environment information
Environment
OS: Any OS really
Compiler(if manually compiled): go1.22.0
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: