Skip to content

feat: add statsd timings for admin endpoints #3467

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

Merged
merged 2 commits into from
Jul 17, 2025

Conversation

bhearsum
Copy link
Contributor

The most important things we need to time here are the /releases endpoints, as they are (mostly) the only ones used frequently, and we also believe them to be some of the least performant ones. I don't think there's much downside to timing just about everything though, especially considering most of them are rarely used, and won't generate data most of the time.

One way I looked at doing this and ultimately rejected was using a timer decorator on specific handlers. This had the upside of allowing custom metric names to be set as an argument (which would've avoided renaming everything), but I decided that decorating everything was both ugly, and not very future proof (we'd probably forget to decorate things in the future).

I plan to use these in metric names, and they could do with a clean-up for consistency, brevity, and understandability.
@bhearsum bhearsum marked this pull request as ready for review July 16, 2025 23:37
@bhearsum bhearsum requested a review from a team as a code owner July 16, 2025 23:37
@bhearsum bhearsum force-pushed the push-uxqvqslzwzkw branch 2 times, most recently from 073883e to 89797b9 Compare July 17, 2025 13:26
The most important things we need to time here are the /releases endpoints, as they are (mostly) the only ones used frequently, and we also believe them to be some of the least performant ones. I don't think there's much downside to timing just about everything though, especially considering most of them are rarely used, and won't generate data most of the time.

One way I looked at doing this and ultimately rejected was using a `timer` decorator on specific handlers. This had the upside of allowing custom metric names to be set as an argument (which would've avoided renaming everything), but I decided that decorating everything was both ugly, and not very future proof (we'd probably forget to decorate things in the future).
@bhearsum bhearsum force-pushed the push-uxqvqslzwzkw branch from 89797b9 to 2c13f1e Compare July 17, 2025 15:00
@bhearsum bhearsum requested a review from Eijebong July 17, 2025 15:15
@bhearsum bhearsum merged commit 0ce0034 into mozilla-releng:main Jul 17, 2025
10 checks passed
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