Skip to content

Conversation

Technoboy-
Copy link
Contributor

@Technoboy- Technoboy- commented Oct 16, 2025

Motivation

Support Native OpenTelemetry Tracing in Pulsar Java client

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Copy link

@Technoboy- Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@Technoboy- Technoboy- changed the title [feat][pip] PIP-446: Native OpenTelemetry Tracing Support in Pulsar Java Client [feat][pip] PIP-446: Support Native OpenTelemetry Tracing in Pulsar Java Client Oct 16, 2025
@Technoboy- Technoboy- self-assigned this Oct 16, 2025
@github-actions github-actions bot added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-label-missing labels Oct 16, 2025
7. **Multi-topic consumer support**: Track spans across multiple topic partitions
8. **Agent compatibility**: Ensure compatibility with OpenTelemetry Java Agent
9. **Semantic conventions**: Follow OpenTelemetry messaging semantic conventions
10. **Zero overhead when disabled**: No performance impact when tracing is not enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One additional point to consider in the design is the behavior when sampling is configured (I believe that's the default) and a specific span isn't recorded at all. In those cases, an implementation can choose to reduce the overhead by omitting certain calls to the OTel tracing API.
This is explained in the Span IsRecording and Sampling documentation.
Although a span isn't sampled, it's still necessary to create child spans to propagate the span context to downstream, so optimizations based on span.isRecording() might not be very useful in the end.

I also noticed that the current Otel API that we have in Pulsar doesn't contain isRecording. We should also make sure to upgrade to latest stable versions of Otel libraries when implementing this PIP.


### 9. Span Attributes

Following [OpenTelemetry messaging semantic conventions](https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the scope of this work include publishing semantic conventions for Pulsar directly to OpenTelemetry project? For example contribution custom attributes to https://github.com/open-telemetry/semantic-conventions/blob/main/model/messaging/registry.yaml / https://github.com/open-telemetry/semantic-conventions/blob/main/model/messaging/spans.yaml and contributing the specification documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, whatever please help review the implementation to avoid missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. PIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants