Prometheus metrics for pipeline tracking#336
Open
chrisarridge wants to merge 1 commit into
Open
Conversation
This commit adds a few prom metrics to track the duration of different parts of the datastore pipeline. These are triggered and computed when rows in the db_status table change from an active to an inactive (IDLE or READY) state. In addition, a metric is added to contain the time since the last data package was built.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a few prom metrics to track the duration of different parts of the datastore pipeline. These are triggered and computed when the management command changes rows in the
db_statusfrom an active to an inactive (IDLEorREADY) state:datastore_last_run_datagetter_duration_secondsdatastore_last_run_datastore_load_duration_secondsdatastore_last_run_grantnav_package_build_duration_secondsdatastore_last_run_monitoring_snapshot_duration_secondsThis will give us timeseries of the performance of different parts of the pipeline which will hopefully help to debug and optimise the pipeline.
In addition, a metric is added to contain the time since the last data package was built (
datastore_time_since_last_grantnav_data_package_build_seconds). This is designed to allow us to retire thedatastore-package-monitorcurrently running on the monitoring server as that script and cron job can be replaced with a prom alert when this gauge exceeds, for example, 14 hours.I've also added some logging to try to debug a current issue in the datastore where the metrics endpoint does not appear to be responding.