Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat][broker] PIP-264: Add replication subscription stats #23026

Conversation

dragosvictor
Copy link
Contributor

PIP-264

Motivation

Adds replicated subscription metrics, defined here and here, to the OpenTelemetry pipeline.

Modifications

  • Added metrics, as described by [feat][doc] PIP-264: Add replication subscription metrics reference pulsar-site#941, to the OpenTelemetry pipeline. Since these metrics expose no high-cardinality attributes, they can be stored as synchronous OpenTelemetry instruments.
  • Instead of the existing Prometheus pulsar_replicated_subscriptions_pending_snapshots counter, opted to expose the number of snapshot operations attempted. The snapshot duration histogram maintains the number of operations completed. Using these values, the number of pending snapshots can be computed at any time.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Updated test ReplicatedSubscriptionTest#testReplicatedSubscriptionAcrossTwoRegions to cover the new metric values.

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

Documentation

Matching PR in forked repository

PR in forked repository: dragosvictor#40

@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Jul 11, 2024
@dragosvictor dragosvictor changed the title Dmisca pip 264 replication subscription stats [feat][broker] PIP-264: Add replication subscription stats Jul 11, 2024
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, good work @dragosvictor

@lhotari
Copy link
Member

lhotari commented Aug 28, 2024

I'll close and re-open to get a fresh run that runs with latest changes from master branch.

@lhotari lhotari closed this Aug 28, 2024
@lhotari lhotari reopened this Aug 28, 2024
@dragosvictor
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 89.74359% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.50%. Comparing base (bbc6224) to head (59c7230).
Report is 556 commits behind head on master.

Files with missing lines Patch % Lines
.../persistent/ReplicatedSubscriptionsController.java 81.81% 2 Missing ⚠️
...tats/OpenTelemetryReplicatedSubscriptionStats.java 91.30% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23026       /-   ##
============================================
  Coverage     73.57%   74.50%    0.92%     
- Complexity    32624    33727     1103     
============================================
  Files          1877     1925       48     
  Lines        139502   144927     5425     
  Branches      15299    15843      544     
============================================
  Hits         102638   107976     5338     
  Misses        28908    28683     -225     
- Partials       7956     8268      312     
Flag Coverage Δ
inttests 27.69% <35.89%> ( 3.11%) ⬆️
systests 24.66% <35.89%> ( 0.33%) ⬆️
unittests 73.86% <89.74%> ( 1.02%) ⬆️

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

Files with missing lines Coverage Δ
...n/java/org/apache/pulsar/broker/PulsarService.java 83.42% <100.00%> ( 1.05%) ⬆️
...istent/ReplicatedSubscriptionsSnapshotBuilder.java 80.85% <100.00%> (-0.40%) ⬇️
.../persistent/ReplicatedSubscriptionsController.java 70.21% <81.81%> (-2.38%) ⬇️
...tats/OpenTelemetryReplicatedSubscriptionStats.java 91.30% <91.30%> (ø)

... and 544 files with indirect coverage changes

@dragosvictor
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@heesung-sn heesung-sn merged commit ed14f21 into apache:master Aug 30, 2024
51 checks passed
@dragosvictor dragosvictor deleted the dmisca-pip-264-replication-subscription-stats branch August 30, 2024 17:04
grssam pushed a commit to grssam/pulsar that referenced this pull request Sep 4, 2024
@lhotari lhotari added this to the 4.0.0 milestone Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required Your PR changes impact docs and you will update later. ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants