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

Refactor & rename ratelimit metrics #2890

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

lambdanis
Copy link
Contributor

Tetragon exposes a counter of events rate limited on export. Let's move this
metric inside the exporter package, so that it's clear what it measures.

Considering possible future development:

  • If there are multiple exporters, rate limits from all of them will be
    included in the same counter (no change)
  • If there are rate limiters not belonging to any exporter, their drops won't
    be counted (this changes here - before all drops by all rate limiters would
    be included in the metric)

Mixing together drops from different exporters/rate limiters might be
misleading, but not exposing some drops at all is problematic too. If this
becomes an issue, a better solution would be probably exposing a counter per
rate limiter (e.g. reuse existing RateLimiter.dropped field), labeled with a
rate limiter identifier. But for now it seems a premature optimization.

Tetragon exposes a counter of events rate limited on export. Let's move this
metric inside the exporter package, so that it's clear what it measures.

Considering possible future development:
* If there are multiple exporters, rate limits from all of them will be
  included in the same counter (no change)
* If there are rate limiters not belonging to any exporter, their drops won't
  be counted (this changes here - before all drops by all rate limiters would
  be included in the metric)

Mixing together drops from different exporters/rate limiters might be
misleading, but not exposing some drops at all is problematic too. If this
becomes an issue, a better solution would be probably exposing a counter per
rate limiter (e.g. reuse existing RateLimiter.dropped field), labeled with a
rate limiter identifier. But for now it seems a premature optimization.

Signed-off-by: Anna Kapuscinska <anna@isovalent.com>
There are multiple places where events can be rate limited, and potentially
there could be multiple things being rate limited. Let's make it clear from the
metric name and description what and where is being rate limitted.

Signed-off-by: Anna Kapuscinska <anna@isovalent.com>
@lambdanis lambdanis added area/metrics Related to prometheus metrics release-note/minor This PR introduces a minor user-visible change labels Sep 8, 2024
@lambdanis lambdanis requested review from mtardy and a team as code owners September 8, 2024 15:26
Copy link

netlify bot commented Sep 8, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit c64c593
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/66ddc23e7005120008f65714
😎 Deploy Preview https://deploy-preview-2890--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lambdanis lambdanis merged commit 1848253 into cilium:main Sep 9, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics Related to prometheus metrics release-note/minor This PR introduces a minor user-visible change
Projects
Development

Successfully merging this pull request may close these issues.

2 participants