-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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/otlp to exporter/syslog not delivering expected output #35317
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
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. |
Thanks for your report. Code owners - @kasia-kujawa @rnishtala-sumo @andrzej-stencel please take a look? |
@atoulme seems like this is indeed an issue, I could work on it, feel free to assign the issue to me. |
Thanks @rnishtala-sumo. Can you describe what and where you think needs to be changed? |
@andrzej-stencel I may have incorrectly triaged this as an issue. I think the issue here is that the input log record didn't have all the expected log record attributes set as described in the examples here So what's listed as a workaround in the ticket is in fact the transformation that's required to bring the input log record to the expected format for the syslog exporter. |
@atoulme @andrzej-stencel I don't think this issue is a bug. The following transformation mentioned in this ticket
is required to bring the input log record to the expected format for the syslog exporter. |
Thanks @rnishtala-sumo for looking into this! Yes, I think I'd agree that technically it's not a bug, it is expected behavior described in the documentation. At the same time, I think I understand where this report is coming from: user has a perfectly fine log entry that they received via OTLP (or any other receiver really) and they want to export it via syslog. They might reasonably expect to have the log's Body used as the syslog MSG and perhaps the Severity used as PRI (priority). In principle I agree this is not a bug at this time. |
Component(s)
exporter/syslog
What happened?
Description
When trying to export otlp log messages to syslog, the resulting message on the syslog end only contains the timestamp from the otlp message. The "message" and the "priority" do not get picked up.
Steps to reproduce
Run docker compose command:
with the following
docker-compose.yml
:Watch incoming message as it has been sent by the otel-collector from the syslog-ng container:
Use curl to send an otlp message to the collector from the docker host:
curl -X POST -H "Content-Type: application/json" -d @logs.json -i localhost:4318/v1/logs
With below content for
logs.json
:Expected result
Actual result
The timestamp is picked up from the otel log entry. Two places where this result deviates from expectations:
severityNumber
Is this by design, or is this exporter/syslog not working as intended?
Workaround
By adding a transform to the otel-collector configuration, the expected result can be achived:
Which now renders the result as expected:
Is this as expected, and should a transformation for all expected attributes always be added?
Collector version
0.109.0
Environment information
Environment
Docker desktop 4.33.0 (160616) on MacOS X 15.0
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: