You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "void-ptr974 (via GitHub)" <gi...@apache.org> on 2026/05/30 05:52:02 UTC
[PR] [fix][client] Fix incorrect topic in OTel spans for partitioned producers [pulsar]
void-ptr974 opened a new pull request, #25896:
URL: https://github.com/apache/pulsar/pull/25896
### Motivation
The OTel producer interceptor cached the topic from the first producer it processed.
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 could still be created as:
`send persistent://public/default/my-topic-partition-0`
and `messaging.destination.name` could also be reported as:
`persistent://public/default/my-topic-partition-0`
This makes OTel producer spans report an incorrect topic for messages sent to other partitions.
### Modifications
Use the current producer topic when creating each OTel producer span instead of caching the first topic.
### Verifying this change
- [x] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- Added an integration test that sends messages with a partitioned producer and verifies producer spans use the correct partition topics.
- Ran `./gradlew :pulsar-client-original:compileJava`
- Ran `./gradlew :pulsar-broker:test --tests org.apache.pulsar.broker.service.OpenTelemetryTracingIntegrationTest.testPartitionedProducerSpanUsesCurrentProducerTopic`
### Does this pull request potentially affect one of the following parts:
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Fix incorrect topic in OTel spans for partitioned producers [pulsar]
Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- commented on PR #25896:
URL: https://github.com/apache/pulsar/pull/25896#issuecomment-5487741453
> @Technoboy- Could you please take a look at this small OpenTelemetry tracing fix when you have time? Thanks!
you can merge this after the test fixed
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Fix incorrect topic in OTel spans for partitioned producers [pulsar]
Posted by "void-ptr974 (via GitHub)" <gi...@apache.org>.
void-ptr974 commented on PR #25896:
URL: https://github.com/apache/pulsar/pull/25896#issuecomment-5009919270
@Technoboy- Could you please take a look at this small OpenTelemetry tracing fix when you have time? Thanks!
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Fix incorrect topic in OTel spans for partitioned producers [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #25896:
URL: https://github.com/apache/pulsar/pull/25896#issuecomment-5522578865
branch-4.0 doesn't contain [PIP-446](https://github.com/apache/pulsar/blob/master/pip/pip-446.md), so dropping branch-4.0 as the backporting target.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Fix incorrect topic in OTel spans for partitioned producers [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #25896:
URL: https://github.com/apache/pulsar/pull/25896#issuecomment-5522557156
depends on #25585 and #25749 while cherry-picking to branch-4.2. Performing the cherry-picking and backporting now.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Fix incorrect topic in OTel spans for partitioned producers [pulsar]
Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- commented on PR #25896:
URL: https://github.com/apache/pulsar/pull/25896#issuecomment-5477046191
> @Technoboy- Could you please take a look at this small OpenTelemetry tracing fix when you have time? Thanks!
could you fix the tests
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Fix incorrect topic in OTel spans for partitioned producers [pulsar]
Posted by "void-ptr974 (via GitHub)" <gi...@apache.org>.
void-ptr974 commented on PR #25896:
URL: https://github.com/apache/pulsar/pull/25896#issuecomment-5490072819
The previous CI failure was from the unrelated `ReplicatorTest.testResumptionAfterBacklogRelaxed`, which was fixed by #26002. I have merged the latest `master`; both the OTel regression test and the previously failing Replicator test pass locally. Please approve the new CI runs when convenient. Thanks!
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Fix incorrect topic in OTel spans for partitioned producers [pulsar]
Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- merged PR #25896:
URL: https://github.com/apache/pulsar/pull/25896
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org