-
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
[receiver/journald] Handle MESSAGE field more conveniently #35964
Labels
Comments
fuero
changed the title
Journald Receiver should handle MESSAGE field correctly
Journald Receiver should handle MESSAGE field more conveniently
Oct 23, 2024
fuero
changed the title
Journald Receiver should handle MESSAGE field more conveniently
[receiver/journald] Handle MESSAGE field more conveniently
Oct 24, 2024
djaglowski
pushed a commit
that referenced
this issue
Oct 30, 2024
#### Description Adds message conversion from byte array support to journald receiver. Introduces a config setting for enabling this behaviour. #### Link to tracking issue Fixes #35964 #### Testing Adds tests for decoding a message successfully to string Tested on a real world example as well with the resulting binary #### Documentation Adds description of the setting the PR introduces
zzhlogin
pushed a commit
to zzhlogin/opentelemetry-collector-contrib-aws
that referenced
this issue
Nov 12, 2024
…6005) #### Description Adds message conversion from byte array support to journald receiver. Introduces a config setting for enabling this behaviour. #### Link to tracking issue Fixes open-telemetry#35964 #### Testing Adds tests for decoding a message successfully to string Tested on a real world example as well with the resulting binary #### Documentation Adds description of the setting the PR introduces
sbylica-splunk
pushed a commit
to sbylica-splunk/opentelemetry-collector-contrib
that referenced
this issue
Dec 17, 2024
…6005) #### Description Adds message conversion from byte array support to journald receiver. Introduces a config setting for enabling this behaviour. #### Link to tracking issue Fixes open-telemetry#35964 #### Testing Adds tests for decoding a message successfully to string Tested on a real world example as well with the resulting binary #### Documentation Adds description of the setting the PR introduces
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
No response
What happened?
Description
MESSAGE might be an byte array, if journald thinks there's a non-printable character inside:
journalctl -xe CONTAINER_NAME=logging-test -o json | jq -crs .[].MESSAGE [72,101,108,108,111,32,87,111,114,108,100,33,13]
The journald receiver forwards this as-is.
Steps to Reproduce
Do
printf("Hello World!")
from inside a docker container and let its logs be pushed to otel-collectorExpected Result
Forward the log line as unicode string, not byte array. Let the exporter take care of shipping it to the destination correctly.
Otherwise, processing steps become more complex
Actual Result
See above
Collector version
0.111.0
Environment information
Environment
OS: Debian Bookworm
Release: otelcol-contrib debian package
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: