opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[receiver/kafkareceiver] Add otlp_json support in kafka receiver

Open joeyyy09 opened this issue 1 year ago • 1 comments

Description: <Describe what has changed.>

The current features dont support otlp_json in receivers/kafkareceivers.

Add support for otlp_json which accepts json formated for Otel Collector kafka receiver Link to tracking Issue: <Issue number if applicable> #33627

Testing: <Describe what testing was performed and which tests were added.> Added test files for the same.

Documentation: <Describe the documentation added.>

joeyyy09 avatar Aug 26 '24 05:08 joeyyy09

this is a draft in process, would love to see if im going in the right direction or not.

joeyyy09 avatar Aug 26 '24 05:08 joeyyy09

@joeyyy09 check the linter failures kafkareceiver/unmarshaler.go:61: File is not gci-ed with --skip-generated -s standard -s default -s prefix(github.com/open-telemetry/opentelemetry-collector-contrib) (gci)

yurishkuro avatar Sep 03 '24 18:09 yurishkuro

@joeyyy09 check the linter failures kafkareceiver/unmarshaler.go:61: File is not gci-ed with --skip-generated -s standard -s default -s prefix(github.com/open-telemetry/opentelemetry-collector-contrib) (gci)

My bad, fixed that.

joeyyy09 avatar Sep 03 '24 18:09 joeyyy09

Support for encoding extensions in the kafkareceiver was just merged with https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/33888. Using the otlpencodingextension should now do the job.

thmshmm avatar Sep 13 '24 11:09 thmshmm

Prom tests are failing on main, not an issue here (https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/35119). Everything else in the PR is green. @open-telemetry/collector-maintainers this can be merged.

@thmshmm I think an upgrade to otlpencodingextension is an independent issue and can be tackled separately, there's no need for it to block this PR.

yurishkuro avatar Sep 13 '24 18:09 yurishkuro