-
Notifications
You must be signed in to change notification settings - Fork 438
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/Shopify/sarama: Fix WrapAsyncProducer tracing support #738
Conversation
* only successfully transmitted message have valid Partition, Offset
@adw1n I can take a look at this today. |
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.
Aside from my minor comment, this looks basically good to me.
Thanks for linking the upstream issues for the mock tracer. I'm not happy about not being able to run the unit tests, so hopefully that can be fixed upstream soon. I'm going to spend a bit of time looking at the mock broker issue to make sure I understand it, and run some manual tests.
Seeing as a working integration with skipped tests is better than a broken integration with tests, we can still move forward even if we can't run the tests yet, provided we open an issue to track the upstream fix so we re-enable the tests when we are able.
@knusbaum please could you have another look at this PR. |
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.
@adw1n Thank you for being patient with this PR.
I ran manual testing on this and it looks good.
We should follow-up on the mock broker in the future or consider adding an integration test.
I have just one minor note about the documentation string and it should be OK. If you don't have time, I can modify the doc.
As a note, there may be conflicts with #761
@knusbaum I resolved the conflict you are referring to a week ago. |
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.
LGTM.
Again, thanks for being patient with this one @adw1n
This is a continuation of now abandoned PR #487 by @HatsuneMiku3939
Closes #483
Quick recap:
dd-trace-go/contrib/Shopify/sarama/sarama.go
Line 207 in ecb0b80
msg.Partition
andmsg.Offset
are always 0. Heredd-trace-go/contrib/Shopify/sarama/sarama.go
Line 223 in ecb0b80
msg.Partition
andmsg.Offset
are set correctly and this linedd-trace-go/contrib/Shopify/sarama/sarama.go
Line 226 in ecb0b80
WrapAsyncProducer
requires at least 0.11.0 no one should hold a grudge. Original WrapAsyncProducer author explains the need for Kafka 0.11.0 here contrib/Shopify/sarama: add support for tracing the sarama kafka package #296 (comment)TestAsyncProducer
tests is really problematic because of brokensarama.MockBroker
for newer kafka versions. You'll see this error when you don't skip the tests:WrapAsyncProducer
even if we can't cover it with tests. Code changes in this PR should be pretty straightforward.