diff options
| author | Jonathan Amsterdam <jba@google.com> | 2020-12-16 07:33:17 -0500 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2020-12-18 12:24:56 +0000 |
| commit | 119183b4e9c74b8237d4f7be93df0ee748e2dad5 (patch) | |
| tree | d5c3e79ac754b099cc9bd1cb529f6a574ba03dab /internal/queue/queue_test.go | |
| parent | 61c85f74cea4af86883de451c30a9f3716b0a011 (diff) | |
| download | go-x-pkgsite-119183b4e9c74b8237d4f7be93df0ee748e2dad5.tar.xz | |
internal/worker: record processing lag metric
Create a metric for the age of the oldest unprocessed module, and record it periodically.
We choose to record it whenever the /poll endpoint is hit. Since that
endpoint is hit periodically (once a minute) by Cloud Scheduler, we
can be sure that we will get exactly one data point per minute. The
downside is that we won't have finer granularity than that, but since
the main purpose of this metric is to detect large lags, that doesn't
matter.
Change-Id: I7ce3f043cceaf567fb0c871676063eda91bb2420
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/278614
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'internal/queue/queue_test.go')
0 files changed, 0 insertions, 0 deletions
