This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed sarama instrumentation and introduced ContextExt interface
Sarama instrumentation was identifying spans with a non-unique and unelibale key which caused a number of issues with span reporting as some spans were not being finished. This commit replaces the said key with the span ID. This span ID is extracted from the kafka message headers and used to identify any pending spans. This requires Kafka (not sarama) version 0.11.0 or newer which was released in 2017. To enable using span IDs in sarama instrumentation, this commit also extends the span interface to add a ContextExt() method. This allows our implementation of Spans to access span IDs while still remaining compatible with OpenTracing Span. Alternatively, we could have added a utility method like `trace.SpanID(ctx)` but we'd have to account for failure and then insrumentation would have to conditionally create and manage spans.
- Loading branch information
Showing
7 changed files
with
96 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters