Skip to content
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

Why Does The Kafka Exporter's Raw Marshaler Marshal Everything Except Raw Bytes To JSON? #32237

Closed
rjduffner opened this issue Apr 9, 2024 · 3 comments
Labels
closed as inactive exporter/kafka needs triage New item requiring triage question Further information is requested Stale

Comments

@rjduffner
Copy link

rjduffner commented Apr 9, 2024

Component(s)

exporter/kafka

Describe the issue you're reporting

We have a use case where we are receiving application logs from a python webapp and then shipping them off to an S3 bucket and to Kafka.

However, we noticed that the outputs to S3 and Kafka are different for the same logs.

Setting the encoding to body in the awss3exporter, seems to pass through the raw value through without any changes. However, when using the kafka exporter's, raw encoding, the value of the log gets converted to JSON. (https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/kafkaexporter/raw_marshaler.go#L78)

Im not saying this is a bug as the documentation is clear that it will do this but I am just trying to get some context in the difference in behavior.

An input like

2024-04-09 02:31:09,896 INFO  [myapp:42][pid=1][tname=MainThread] message="Hello World", action_type="say.hello"

Would be unchanged in the awss3exporter but yield a result of

"2024-04-09 02:31:09,896 INFO  [myapp:42][pid=1][tname=MainThread] message=\"Hello World\", action_type=\"say.hello\""

in the kafka exporter.

I would suggest a body marshaler (like that in the awss3exporter) but that seems strange when on the kafka recevier there is a specific JSON Unmarshaler and the word "raw" to me means, unchanged.

Thanks for any information!

@rjduffner rjduffner added the needs triage New item requiring triage label Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jun 10, 2024
Copy link
Contributor

github-actions bot commented Aug 9, 2024

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed as inactive exporter/kafka needs triage New item requiring triage question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

2 participants