You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] OTel consumer spans use incorrect topic for multi-topic consumers #25895
I searched in the issues and found nothing similar.
Read release policy
I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
User environment
Pulsar Java client with OpenTelemetry tracing enabled.
Observed from the current master branch code path.
This issue is not tied to a specific broker OS or deployment environment.
Issue Description
When OpenTelemetry tracing is enabled, consumer spans for multi-topic consumers can use the internal consumer topic name instead of the actual topic of the consumed message.
For example, the span name and messaging.destination.name can contain:
MultiTopicsConsumer-*
instead of the real Pulsar topic or partition topic that the message came from.
This makes traces misleading because users cannot see the actual message source topic from the consumer span.
Error messages
No error messages or stack traces are emitted. The issue is incorrect OpenTelemetry span metadata.
Reproducing the issue
Enable OpenTelemetry tracing in the Pulsar Java client.
Create a consumer subscribed to multiple topics.
Receive and acknowledge a message.
Inspect the exported consumer span.
Actual result:
span name = process MultiTopicsConsumer-*
messaging.destination.name = MultiTopicsConsumer-*
Expected result:
span name = process <actual-message-topic>
messaging.destination.name = <actual-message-topic>
Activity