Skip to content

feat(kafkajs): add messaging.kafka.cluster.id as opt-in experimental span attribute #3622

Description

@shashank-reddy-nr

Problem

KafkaJS producer and consumer spans do not include messaging.kafka.cluster.id. When the same topic name exists across multiple clusters or environments, there is no way to distinguish which cluster a span came from.

Expected behavior

messaging.kafka.cluster.id (semconv) should be available as an opt-in experimental attribute on KafkaJS producer and consumer spans, disabled by default via the existing captureExperimentalSpanAttributes flag.

Context

Part of a cross-language effort to add this attribute consistently across OTel instrumentations. See opentelemetry-java-instrumentation#18977 for the cross-language tracking issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions