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: add linode SD failure count metric #10673

Merged
merged 1 commit into from May 11, 2022

Conversation

tjhop
Copy link
Contributor

@tjhop tjhop commented May 9, 2022

This commit introduces a new metric to count the number of failed
requests to Linode's API when using Linode SD. Resolves #10672, inspired
by #10476.

Note: this doens't count failures when polling the /account/events
endpoint, as a 401 there is how we determine if the supplied token has
the needed API scopes to do event polling vs full refreshes each
interval.

Signed-off-by: TJ Hoplock t.hoplock@gmail.com

@tjhop
Copy link
Contributor Author

tjhop commented May 9, 2022

cc: @roidelapluie for when you get time!

@roidelapluie
Copy link
Member

LGTM, can you please fix linting?

@tjhop
Copy link
Contributor Author

tjhop commented May 9, 2022

My bad! Should've let CI runs complete before pinging you, sorry about that. I'll fix it!

This commit introduces a new metric to count the number of failed
requests to Linode's API when using Linode SD. Resolves prometheus#10672, inspired
by prometheus#10476.

_Note_: this doens't count failures when polling the `/account/events`
endpoint, as a `401` there is how we determine if the supplied token has
the needed API scopes to do event polling vs full refreshes each
interval.

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
@tjhop tjhop force-pushed the feat/linode-sd-failure-metric branch from 9fab601 to 4caaad7 Compare May 10, 2022 13:46
@tjhop
Copy link
Contributor Author

tjhop commented May 10, 2022

TIL about local package prefixes for goimports command.

Looking better now, @roidelapluie!

@roidelapluie roidelapluie merged commit c40e269 into prometheus:main May 11, 2022
@roidelapluie
Copy link
Member

Thanks!

@tjhop tjhop deleted the feat/linode-sd-failure-metric branch May 11, 2022 14:56
roidelapluie pushed a commit to roidelapluie/prometheus that referenced this pull request Jun 22, 2022
This commit introduces a new metric to count the number of failed
requests to Linode's API when using Linode SD. Resolves prometheus#10672, inspired
by prometheus#10476.

_Note_: this doens't count failures when polling the `/account/events`
endpoint, as a `401` there is how we determine if the supplied token has
the needed API scopes to do event polling vs full refreshes each
interval.

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
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.

Introduce Linode SD Failure Count Metric
2 participants