Add metrics to the job queue

This adds:

 - a histogram of the time it takes to process a job for each queue,
   with the status of the job (success, failure, etc.)
 - a histogram which records the time it takes to do a "tick", fetch jobs
 - a counter of the number of jobs currently in-flight for each queue
 - a counter which tracks the reasons why the worker got worken up
This commit is contained in:
Quentin Gliech
2024-12-13 15:47:59 +01:00
parent 1abd57e9c9
commit 2dbfbfb03f
4 changed files with 198 additions and 19 deletions

View File

@@ -29,6 +29,7 @@ tower.workspace = true
tracing.workspace = true
tracing-opentelemetry.workspace = true
opentelemetry.workspace = true
opentelemetry-semantic-conventions.workspace = true
ulid.workspace = true
url.workspace = true
serde.workspace = true