Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: instrument github oauth2 limits#11532

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 5 commits intomainfromstevenmasley/github_ratelimit
Jan 10, 2024

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJan 9, 2024
edited
Loading

What this does

The other PR tracks outbound requests, but github tells us our rate limits in all responses. This pr adds some additional rate limit metrics for github.

This should be even more helpful identifying how close we get to our limits.

Example prom metrics

Example

# HELP coderd_oauth2_external_requests_rate_limit_next_reset_unix Unix timestamp of the next interval# TYPE coderd_oauth2_external_requests_rate_limit_next_reset_unix gaugecoderd_oauth2_external_requests_rate_limit_next_reset_unix{name="primary-github",resource="core"} 1.704835507e+09coderd_oauth2_external_requests_rate_limit_next_reset_unix{name="secondary-github",resource="core"} 1.704835507e+09coderd_oauth2_external_requests_rate_limit_next_reset_unix{name="secondary-github",resource="core-unauthorized"} 1.70483538e+09# HELP coderd_oauth2_external_requests_rate_limit_remaining The remaining number of allowed requests in this interval.# TYPE coderd_oauth2_external_requests_rate_limit_remaining gaugecoderd_oauth2_external_requests_rate_limit_remaining{name="primary-github",resource="core"} 4894coderd_oauth2_external_requests_rate_limit_remaining{name="secondary-github",resource="core"} 4890coderd_oauth2_external_requests_rate_limit_remaining{name="secondary-github",resource="core-unauthorized"} 0# HELP coderd_oauth2_external_requests_rate_limit_reset_in_seconds Seconds until the next interval# TYPE coderd_oauth2_external_requests_rate_limit_reset_in_seconds gaugecoderd_oauth2_external_requests_rate_limit_reset_in_seconds{name="primary-github",resource="core"} 193.928881099coderd_oauth2_external_requests_rate_limit_reset_in_seconds{name="secondary-github",resource="core"} 192.443556963coderd_oauth2_external_requests_rate_limit_reset_in_seconds{name="secondary-github",resource="core-unauthorized"} 70.670050739# HELP coderd_oauth2_external_requests_rate_limit_total The total number of allowed requests per interval.# TYPE coderd_oauth2_external_requests_rate_limit_total gaugecoderd_oauth2_external_requests_rate_limit_total{name="primary-github",resource="core"} 5000coderd_oauth2_external_requests_rate_limit_total{name="secondary-github",resource="core"} 5000coderd_oauth2_external_requests_rate_limit_total{name="secondary-github",resource="core-unauthorized"} 60# HELP coderd_oauth2_external_requests_rate_limit_used The number of requests made in this interval.# TYPE coderd_oauth2_external_requests_rate_limit_used gaugecoderd_oauth2_external_requests_rate_limit_used{name="primary-github",resource="core"} 106coderd_oauth2_external_requests_rate_limit_used{name="secondary-github",resource="core"} 110coderd_oauth2_external_requests_rate_limit_used{name="secondary-github",resource="core-unauthorized"} 108

@EmyrkGraphite App
Copy link
MemberAuthor

Emyrk commentedJan 9, 2024
edited
Loading

In this stack:📊 Improve observability and metrics for OAuth2 integration

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@Emyrk and the rest of your teammates onGraphiteGraphite

@EmyrkEmyrkforce-pushed thestevenmasley/oauth_instrument branch from1993093 to5222f66CompareJanuary 9, 2024 22:31
@EmyrkEmyrkforce-pushed thestevenmasley/github_ratelimit branch fromd8fda1e tof13df6fCompareJanuary 9, 2024 22:31
@EmyrkEmyrk marked this pull request as ready for reviewJanuary 9, 2024 22:31
@EmyrkEmyrk requested a review frommafredriJanuary 9, 2024 22:32
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Sorry for the decoupled comments, Graphite defaults to separate comments instead of review batch. 😅

Emyrk reacted with thumbs up emoji
@EmyrkEmyrkforce-pushed thestevenmasley/oauth_instrument branch frome48a44f to85e2d91CompareJanuary 10, 2024 14:50
@EmyrkEmyrkforce-pushed thestevenmasley/github_ratelimit branch from36d7d39 tocdc2e07CompareJanuary 10, 2024 15:00
Base automatically changed fromstevenmasley/oauth_instrument tomainJanuary 10, 2024 15:13
@EmyrkEmyrkforce-pushed thestevenmasley/github_ratelimit branch fromcdc2e07 toe7e555eCompareJanuary 10, 2024 15:14
@EmyrkEmyrkenabled auto-merge (squash)January 10, 2024 15:20
@EmyrkEmyrk merged commit3f9da67 intomainJan 10, 2024
@EmyrkEmyrk deleted the stevenmasley/github_ratelimit branchJanuary 10, 2024 15:29
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 10, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@mafredrimafredrimafredri approved these changes

Assignees

@EmyrkEmyrk

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Emyrk@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp