-
Notifications
You must be signed in to change notification settings - Fork 419
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: add support for tracing the sarama kafka package #296
Conversation
Looks like there are some issues with the tests. I also forgot to allow customizing the service name. Working on that now. |
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.
This one is now deadlocking in tests when "successes" are enabled. One of the "sync producer" tests is also failing to set the right partition and offset.
I'm not quite sure why it was passing before and isn't now...
I think this is related to recent changes in the upstream library. I will fix the tests. |
The issue was caused by attempting to add a metadata header to the kafka producer message payload which is only supported in versions >= 0.11. The default protocol version is 0.8.2, so that explains why the test broke. I added code to only add the header if the version is at least 0.11. |
Nice! Thanks for making these changes. CI is still failing though... :-/ |
@gbbr I updated the test to match the example and it passed this time: https://github.com/Shopify/sarama/blob/46cf3e2cf1acef7876068f66cf69ec31aad2d0b2/sync_producer_test.go#L57 |
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.
Awesome! Thanks!
Fixes #295
This PR implements wrappers for
Consumer
,SyncProducer
andAsyncProducer
. It also implements carriers forProducerMessage
andConsumerMessage
so that span contexts can be injected and extracted.I modeled the naming and behavior after our dd-trace-java integration.