Improvements Confluent Kafka#4297
Draft
mviamari-crexi wants to merge 10 commits intoopen-telemetry:mainfrom
Draft
Improvements Confluent Kafka#4297mviamari-crexi wants to merge 10 commits intoopen-telemetry:mainfrom
mviamari-crexi wants to merge 10 commits intoopen-telemetry:mainfrom
Conversation
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a fix for some long standing issues with the ConfluentKafka span creation, particularly around
consumeandpoll. In those cases, because the trace context isn't known until after the message is received (the context is extracted from the headers), any spans created are orphaned spans. So when the span is created for the poll operation, there is no parent trace. Then any spans created during message processing are children of that orphaned span, despite the span links, rather than part of the trace provided by the header context.This is fixed in both cases by not creating a span for the poll or consume operations. According to the chart at the end of this semantics doc https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/kafka.md, the poll and consume operation spans would nominally be created by the client, rather than the producer or consumer. There are some semantics around what constitutes the client in this case, but the poll and consumer network operations are handled by librdkafka for the confluent-kafka producer and consumer.
Fixes one or more of these issues. They are all several years old, and maybe it would have been better to start from their work, but it seemed more expedient to just start from the latest and recreate the fixes.
#1966
#1674
#1678
Type of change
How Has This Been Tested?
Added unit tests
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.