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: Only write duration metric on success #190

Closed
wants to merge 2 commits into from

Conversation

morgsmccauley
Copy link
Collaborator

@morgsmccauley morgsmccauley commented Sep 14, 2023

EXECUTION_DURATION will only be written when the indexer has been successfully executed, otherwise it is set to -1. This allows us to filter out these values in Grafana, and therefore only show accurate metrics.

@morgsmccauley morgsmccauley requested a review from a team as a code owner September 14, 2023 03:27
@morgsmccauley
Copy link
Collaborator Author

Because Grafana only scrapes every ~10 seconds or so, it's likely that the 'valid' values of these metrics will be missed, i.e. an indexer successfully executes, setting the metric duration, and then is almost instantly set back to -1 if there is no other messages. Then when Grafana scrapes, it will only get -1, and not the actual duration prior.

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.

1 participant