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

Add metrics for AutoUpdatingSolverTokenOwnerFinder #842

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

MartinquaXD
Copy link
Contributor

@MartinquaXD MartinquaXD commented Nov 23, 2022

Sometimes the new token owner finder implementation is quite noisy because it always logs an error when something fails. However, those errors tend to be temporary, not critical and not really actionable (because we are relying on external servers).
To not let the alert channels become too noisy we can simply add a few metrics and alert based on those.

In order to have meaningful metrics we need to have some identifier associated with them (in case we have to query more urls in the future). To not introduce unnecessary complexity I decided to simply use the urls as the identifier.

Test Plan

Manual test running the order book locally and grepping for the new metrics:

# HELP gp_v2_api_updates Tracks how often a token owner update succeeded or failed.
# TYPE gp_v2_api_updates counter
gp_v2_api_updates{identifier="https://seasolver.dev/token_holders",result="failure"} 0
gp_v2_api_updates{identifier="https://seasolver.dev/token_holders",result="success"} 25

@MartinquaXD MartinquaXD requested a review from a team as a code owner November 23, 2022 13:37
Copy link
Contributor

@nlordell nlordell left a comment

Choose a reason for hiding this comment

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

Nice!

@MartinquaXD MartinquaXD enabled auto-merge (squash) November 23, 2022 15:52
@MartinquaXD MartinquaXD merged commit 59044f3 into main Nov 23, 2022
@MartinquaXD MartinquaXD deleted the metrics-for-token-owner-finder branch November 23, 2022 15:56
@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants