Skip to content

Conversation

@equanz
Copy link
Contributor

@equanz equanz commented Oct 2, 2025

PIP: #21080

Motivation

Please see the PIP-264 doc.

ref.

Modifications

  • Added publish latency histogram as OTel metrics
  • Added PulsarDeprecatedMetric annotation to the pulsar_broker_publish_latency Prometheus metrics

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added a simple E2E test to verify the expected metrics is exposed

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • 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
    • Introducing the new OTel metrics pulsar.broker.topic.publish.latency
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository: equanz#13

@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Oct 2, 2025
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.25%. Comparing base (e44e084) to head (498fe16).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #24810       +/-   ##
=============================================
+ Coverage     38.36%   74.25%   +35.89%     
- Complexity    13171    33763    +20592     
=============================================
  Files          1854     1912       +58     
  Lines        144870   149084     +4214     
  Branches      16808    17299      +491     
=============================================
+ Hits          55574   110704    +55130     
+ Misses        81752    29541    -52211     
- Partials       7544     8839     +1295     
Flag Coverage Δ
inttests 26.25% <100.00%> (+0.02%) ⬆️
systests 22.68% <100.00%> (+<0.01%) ⬆️
unittests 73.77% <100.00%> (+39.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rg/apache/pulsar/broker/service/AbstractTopic.java 88.35% <100.00%> (+22.11%) ⬆️
.../org/apache/pulsar/broker/service/PulsarStats.java 87.02% <100.00%> (+3.30%) ⬆️
.../pulsar/broker/stats/BrokerOperabilityMetrics.java 94.69% <100.00%> (+1.07%) ⬆️

... and 1412 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lhotari lhotari merged commit 24f3814 into apache:master Oct 7, 2025
122 of 127 checks passed
@lhotari lhotari added this to the 4.2.0 milestone Oct 7, 2025
lhotari pushed a commit that referenced this pull request Oct 8, 2025
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/metrics cherry-picked/branch-4.1 doc-required Your PR changes impact docs and you will update later. release/4.1.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants