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 HTTP rate limiting filter metric #23042

Merged

Conversation

dragosvictor
Copy link
Contributor

@dragosvictor dragosvictor commented Jul 16, 2024

PIP-264

Motivation

Adds metrics for the HTTP RateLimitingFilter class, currently exposed as Prometheus metric pulsar_broker_http_rejected_requests (ref).

Modifications

  • Added metrics, as described by [feat][doc] PIP-264: Add OpenTelemetry HTTP rate limiting metrics reference pulsar-site#944, to the OpenTelemetry pipeline.
  • Deviating from the exiting design, the new metric exposes counters for both accepted and rejected requests. The cost for doing this is very small, and we get increased visibility into the server.
  • Note this PR only exposes these values for the broker. The proxy and function worker integration will be done separately.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Updated tests WebServiceTest#testRateLimiting to validate the metric counts.

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

Documentation

Matching PR in forked repository

PR in forked repository: dragosvictor#43

@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Jul 16, 2024
@dragosvictor dragosvictor marked this pull request as ready for review July 16, 2024 16:56
@dao-jun dao-jun added this to the 3.4.0 milestone Jul 16, 2024
@dao-jun dao-jun closed this Jul 16, 2024
@dao-jun dao-jun reopened this Jul 16, 2024
@merlimat merlimat merged commit 59136a0 into apache:master Jul 17, 2024
72 of 76 checks passed
@dragosvictor dragosvictor deleted the dmisca-pip-264-http-rate-limiting-filter branch July 17, 2024 17:16
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
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.

4 participants