void-ptr974 opened a new issue, #25895:
URL: https://github.com/apache/pulsar/issues/25895

   ### Search before reporting
   
   - [x] I searched in the issues and found nothing similar.
   
   ### Read release policy
   
   - [x] 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:
   
   ```text
   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
   
   1. Enable OpenTelemetry tracing in the Pulsar Java client.
   2. Create a consumer subscribed to multiple topics.
   3. Receive and acknowledge a message.
   4. Inspect the exported consumer span.
   
   Actual result:
   
   ```text
   span name = process MultiTopicsConsumer-*
   messaging.destination.name = MultiTopicsConsumer-*
   ```
   
   Expected result:
   
   ```text
   span name = process <actual-message-topic>
   messaging.destination.name = <actual-message-topic>
   ```
   
   ### Additional information
   
   A fix is proposed in https://github.com/apache/pulsar/pull/25894.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to