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

   ### 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
   - Partitioned topic producer
   - Broker version is not expected to be specific to this issue
   
   ### Issue Description
   
   The OTel producer interceptor caches the topic from the first producer it 
processes.
   
   For partitioned producers, the same interceptor can be used by multiple 
internal partition producers. For example, if the first message is sent to:
   
   `persistent://public/default/my-topic-partition-0`
   
   the interceptor caches that topic. If a later message is sent to:
   
   `persistent://public/default/my-topic-partition-1`
   
   the producer span can still be created as:
   
   `send persistent://public/default/my-topic-partition-0`
   
   and `messaging.destination.name` can also be reported as:
   
   `persistent://public/default/my-topic-partition-0`
   
   Expected behavior: OTel producer spans should report the topic of the 
partition producer that sends the message.
   
   Actual behavior: OTel producer spans can report the topic from a different 
partition.
   
   ### Error messages
   
   No error message is produced. The issue is visible in exported OTel span 
data.
   
   ### Reproducing the issue
   
   1. Create a partitioned topic with multiple partitions.
   2. Create a Pulsar Java client with OpenTelemetry tracing enabled.
   3. Create a producer for the partitioned topic.
   4. Send messages to multiple partitions, for example with round-robin 
routing and batching disabled.
   5. Inspect exported producer spans.
   
   Producer spans for later partitions can contain the first cached partition 
topic in the span name and `messaging.destination.name`.
   
   ### Additional information
   
   Related PR: https://github.com/apache/pulsar/pull/25896
   
   ### 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