feat: update to otel semconv 1.40.0#719
Open
epbensimpson wants to merge 2 commits intoFarfetch:masterfrom
Open
feat: update to otel semconv 1.40.0#719epbensimpson wants to merge 2 commits intoFarfetch:masterfrom
epbensimpson wants to merge 2 commits intoFarfetch:masterfrom
Conversation
kchenery
approved these changes
Apr 2, 2026
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
Updates
KafkaFlow.OpenTelemetryto the OTEL Semantic Conventions1.40.0(current version at time of writing).https://github.com/open-telemetry/semantic-conventions/blob/v1.40.0/docs/messaging/kafka.md
This contains some breaking changes to attribute names due to the unstable nature of the spec.
Implements #470
Summary of changes
Removed
peer.serviceRenamed
messaging.operation="publish"messaging.operation.type="send"+messaging.operation.name="publish"messaging.operation="process"messaging.operation.type="receive"+messaging.operation.name="process"messaging.source.namemessaging.destination.namemessaging.kafka.consumer.groupmessaging.consumer.group.namemessaging.kafka.message.offsetmessaging.kafka.offsetmessaging.kafka.source.partitionmessaging.destination.partition.idmessaging.kafka.destination.partitionmessaging.destination.partition.idAdded
messaging.client.idConsumerContext.ConsumerName— closest available proxy for the Kafka client ID, which is not exposed byIConsumerContextmessaging.kafka.message.tombstone=truemessaging.message.body.sizebyte[](i.e. before deserialization middleware has run)error.typeBug fix
messaging.kafka.message.key: the consumer previously always emitted this tag (empty string for null keys, with an unsafe cast tobyte[]), and the producer emitted the rawobject. Both now share aFormatMessageKeyhelper that UTF-8 decodesbyte[]keys, callsToString()on other types, and omits the tag entirely when the key is null.Checklist
Disclaimer
By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement