From cb117d8346f3a0275b4c9b92edf5f00d2db35fa1 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Mon, 11 Jan 2016 17:22:16 +0100 Subject: [PATCH] Add a series ops metric "purge_on_request" It counts series deletions triggered via the API. --- storage/local/instrumentation.go | 1 + storage/local/storage.go | 1 + 2 files changed, 2 insertions(+) diff --git a/storage/local/instrumentation.go b/storage/local/instrumentation.go index 91f9b72c1..85a7aa5e0 100644 --- a/storage/local/instrumentation.go +++ b/storage/local/instrumentation.go @@ -57,6 +57,7 @@ const ( unarchive = "unarchive" memoryPurge = "purge_from_memory" archivePurge = "purge_from_archive" + requestedPurge = "purge_on_request" memoryMaintenance = "maintenance_in_memory" archiveMaintenance = "maintenance_in_archive" diff --git a/storage/local/storage.go b/storage/local/storage.go index 3ef755a30..9b1a4d644 100644 --- a/storage/local/storage.go +++ b/storage/local/storage.go @@ -527,6 +527,7 @@ func (s *memorySeriesStorage) DropMetricsForFingerprints(fps ...model.Fingerprin } s.fpLocker.Unlock(fp) + s.seriesOps.WithLabelValues(requestedPurge).Inc() } }