-
Notifications
You must be signed in to change notification settings - Fork 416
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
contrib/confluentinc/confluent-kafka-go/kafka: Use kafka headers as c… #943
Conversation
742c291
to
2085592
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @hexa00
We should include clear examples of how to use this, as well as tests for the behavior.
We also need to maintain the existing behavior for anyone using the WithContext
option. IMO, we should mark WithContext
deprecated.
@knusbaum thank you, a few questions:
|
Sorry, I should have been clearer. :)
Thanks. |
@knusbaum great thanks for the info, I'll work on that today |
2316c21
to
80bbf8d
Compare
@knusbaum this PR is ready for a second look: Changes:
Let me know what you think, thanks! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hexa00 Looks great. Thanks for making those changes.
Just one more change to the new example file and we should be good.
@@ -0,0 +1,80 @@ | |||
package kafka_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the license header to this file.
…ontext when producing Before this patch when producing a message, the general producer context was used when producing messages. This made it impossible to attach a parent span to a produced message. With this patch messages headers are checked when producing messages for a span context and the span is created as a child if a parent span is present. This patch deprecates the WithContext() option for consumer and producers. Fixed DataDog#941
a6fd2a1
to
de6aa0a
Compare
@knusbaum indeed , fixed and rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👍
…ontext when producing
Before this patch when producing a message, the general producer context was
used when producing messages.
This made it impossible to attach a parent span to a produced message.
With this patch messages headers are checked when producing messages for a span
context and the span is created as a child if a parent span is present.
Also StartSpanFromContext is changed to just StarSpan since using the global
consumer/producer context has no use.
Fixed #941