Skip to content

Conversation

@lahsivjar
Copy link
Contributor

Since the component now supports decreasing the rate limit, adapt the RatelimitDynamicEscalations metric accordingly.

@lahsivjar lahsivjar requested review from a team as code owners October 23, 2025 14:40
)
} else { // Dynamic escalation was skipped (dynamic <= static)
} else if rate < cfg.Rate {
r.telemetryBuilder.RatelimitDynamicEscalations.Add(ctx, 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[For reviewers] (CC: @marclop) I am not sure about this metric with the latest changes. I was thinking to base this off of the value of the multiplier but I am not sure if that will be helpful either. I have updated the current metric based on if it is higher or lower than the configured static rate but it won’t catch if it is under degradation and starting to decrease from the static rate. We can probably do this by comparing against the previous rate rather than the static rate. Let me know what you think.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe an alternative to this metric would be to have a gauge where the final rate is published with the right dimensions (metadata keys, class, etc).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, that sounds like a good idea. A gauge will give direct insight into the rate, do you think we should keep this one too or replace this entirely?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm more inclined to remove this one and add a gauge than keep it, but if you think it adds good insight we can keep it as well. But seems redundant if we add the gauge, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

ready to review again once you make the changes discussed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants