Skip to content

Kafka producer instrumentation not propagating span context from record headers #5092

@allie-jo

Description

@allie-jo

The kafka producer decorator doesn't seem to read the record's headers for a span context to become the child of when they exist. This came up when trying to set up distributed tracing through debezium using the outbox pattern where the span context is sent across system boundaries first as a serialized field in the outbox table then injected into the debezium record which is then produced with a standard kafka producer.

you can see this sort of context propagation in the opentracing instrumentation for kafka clients here but i'm not seeing the same kind of propagation from the datadog kafka decorator. I can see it injecting the context of it's current span here but that doesn't attempt to read the headers before doing so.

Am I missing something here? an option somewhere? thanks y'all!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions