Spring Kafka
OpenTelemetry Java agent instrumentation
This instrumentation enables consumer messaging spans for Spring Kafka listeners.
- Name:
spring-kafka-2.7 - Scope:
io.opentelemetry.spring-kafka-2.7 - Target versions:
org.springframework.kafka:spring-kafka:[2.7.0,) - Library: https://spring.io/projects/spring-kafka
Telemetry
- Span attributes:
messaging.batch.message_count,messaging.client_id,messaging.destination.name,messaging.destination.partition.id,messaging.kafka.consumer.group,messaging.kafka.message.key,messaging.kafka.message.offset,messaging.message.body.size,messaging.operation,messaging.system,kafka.record.queue_time_ms
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
otel.instrumentation.messaging.experimental.capture-headers | list | A comma-separated list of header names to capture as span attributes. | |
otel.instrumentation.kafka.experimental-span-attributes | boolean | false | Enables the capture of the experimental consumer attribute kafka.record.queue_time_ms and messaging.kafka.bootstrap.servers. |
otel.instrumentation.messaging.experimental.receive-telemetry.enabled | boolean | false | Enables experimental receive telemetry, which will cause consumers to start a new trace, with only a span link connecting it to the producer trace. |