[exporter/kafka] Add record_headers config to set static headers on outgoing records#47201
Conversation
Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
|
The issue hasn't been discussed yet. Marking this as draft until agreement is reached. |
|
@singhvibhanshu I think what this is missing is precedence order. I think we would want |
Mixed feelings about that, but let's discuss in the issue to have a proper agreement there with other codeowners 👍 |
axw
left a comment
There was a problem hiding this comment.
Thanks @singhvibhanshu. Looks good, just a few comments.
Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
|
This PR got merge conflict. |
axw
left a comment
There was a problem hiding this comment.
LGTM, minus the merge conflict. Thanks!
Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
|
I've resolved the merge conflicts and modfied the test. |
|
/rerun |
7f5cdac
into
open-telemetry:main
|
Thank you for your contribution @singhvibhanshu! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help. |
…utgoing records (open-telemetry#47201) ## Description Resolves open-telemetry#47193 This PR adds a new `record_headers` configuration option to the Kafka exporter **Changes made:** * added `record_headers` to `Config` struct * updated `makeFranzMessages` in the `franz-go` client wrapper to iterate over the configured map and append them as `kgo.RecordHeader` to the outgoing messages * added `TestMakeFranzMessages_RecordHeaders` to verify headers are successfully attached, bringing test suite to 147 passing tests * documented the new field and provided an example in the `README.md` * added `.chloggen/fix-47193.yaml` ## Testing - [x] added `TestMakeFranzMessages_RecordHeaders` - [x] all 147 tests passed locally --------- Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
…utgoing records (open-telemetry#47201) ## Description Resolves open-telemetry#47193 This PR adds a new `record_headers` configuration option to the Kafka exporter **Changes made:** * added `record_headers` to `Config` struct * updated `makeFranzMessages` in the `franz-go` client wrapper to iterate over the configured map and append them as `kgo.RecordHeader` to the outgoing messages * added `TestMakeFranzMessages_RecordHeaders` to verify headers are successfully attached, bringing test suite to 147 passing tests * documented the new field and provided an example in the `README.md` * added `.chloggen/fix-47193.yaml` ## Testing - [x] added `TestMakeFranzMessages_RecordHeaders` - [x] all 147 tests passed locally --------- Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
Description
Resolves #47193
This PR adds a new
record_headersconfiguration option to the Kafka exporterChanges made:
record_headerstoConfigstructmakeFranzMessagesin thefranz-goclient wrapper to iterate over the configured map and append them askgo.RecordHeaderto the outgoing messagesTestMakeFranzMessages_RecordHeadersto verify headers are successfully attached, bringing test suite to 147 passing testsREADME.md.chloggen/fix-47193.yamlTesting
TestMakeFranzMessages_RecordHeaders