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][misc] PIP-264: Add OpenTelemetry messaging rate limit metrics #23035

Conversation

dragosvictor
Copy link
Contributor

PIP-264

Motivation

Adds messaging rate limit metrics, currently exposed in classes InflightReadsLimiter and ServerCnxThrottleTracker, to the OpenTelemetry pipeline.

Modifications

  • Added metrics, as described by [feat][doc] PIP-264: Add OpenTelemetry messaging rate limit metrics reference pulsar-site#943, to the OpenTelemetry pipeline.
  • The metrics differ slightly from the existing ones:
    • Connection throttling metrics are cumulative totals, instead of the instantaneous value in the existing Prometheus metric pulsar_broker_throttled_connections. This gives better visibility into the frequency of rate limiting operations.
    • Connection throttling metrics are exposed for pause/resume operations too.
    • Managed ledger inflight reads metrics expose both the hard-wired limit and current usage, for increased visibility.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Updated tests InflightReadsLimiterTest#testDisabled and InflightReadsLimiterTest#testBasicAcquireRelease to cover the changes to the InflightReadsLimiter metrics
  • Updated tests in MessagePublishBufferThrottleTest to verify connection pause/unpause metrics
  • Added test MessagePublishBufferThrottleTest#testConnectionThrottled to verify connection throttle/unthrottle metrics

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

Documentation

Matching PR in forked repository

PR in forked repository: dragosvictor#41

@dragosvictor dragosvictor marked this pull request as ready for review July 16, 2024 06:10
@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Jul 16, 2024
@heesung-sn heesung-sn merged commit c9c5bb4 into apache:master Jul 23, 2024
57 of 58 checks passed
@dragosvictor dragosvictor deleted the dmisca-pip-264-inflight-reads-limiter-metrics branch July 24, 2024 16:25
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants