Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 69109d3

Browse files
Add alerts for database sql metrics.
Signed-off-by: Harkishen-Singh <[email protected]> This commit adds alerts for database metrics, under `promscale-database` group.
1 parent ee8a8ec commit 69109d3

File tree

6 files changed

+193
-96
lines changed

6 files changed

+193
-96
lines changed

docs/mixin/alerts/alerts.yaml

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,65 @@ groups:
228228
severity: warning
229229
annotations:
230230
summary: Slow database response
231-
description: "Slowest 10% of database requests are taking more than {{ $value }} seconds to respond."
231+
description: "Slowest 10% of database requests are taking more than {{ $value }} seconds to respond."
232+
- name: promscale-database
233+
rules:
234+
- alert: PromscaleStorageUnhealthy
235+
expr: |
236+
(
237+
sum by (job) (
238+
rate(promscale_sql_database_health_check_errors_total[5m])
239+
)
240+
/
241+
sum by (job) (
242+
rate(promscale_sql_database_health_check_total[5m])
243+
)
244+
) > 0.05
245+
labels:
246+
severity: warning
247+
annotations:
248+
summary: Promscale database is unhealthy
249+
description: "Promscale connection with the database has an error of {{ $value | humanizePercentage }}."
250+
- alert: PromscaleMaintenanceJobRunningTooLong
251+
expr: |
252+
(
253+
(
254+
(
255+
time()
256+
-
257+
promscale_sql_database_worker_maintenance_job_start_timestamp_seconds
258+
)
259+
>
260+
30 * 60 * 2 # 30 mins (we launch maintenance jobs scheduled at 30 mins) * 60 (to seconds) * 2 (wait max for 2 complete scans before firing alert).
261+
)
262+
and
263+
promscale_sql_database_worker_maintenance_job_start_timestamp_seconds > 0
264+
)
265+
labels:
266+
severity: warning
267+
annotations:
268+
summary: Promscale maintenance jobs taking too long to complete
269+
description: "Promscale Database is taking {{ $value }} seconds to respond to Promscale's requests."
270+
- alert: PromscaleMaintenanceJobFailures
271+
expr: promscale_sql_database_worker_maintenance_job_failed == 1
272+
labels:
273+
severity: warning
274+
annotations:
275+
summary: Promscale maintenance job failed
276+
description: "Promscale maintenance job failed to successfully execute."
277+
- alert: PromscaleCompressionRatioLow
278+
expr: |
279+
(
280+
(
281+
promscale_sql_database_chunks_compressed_count
282+
/
283+
promscale_sql_database_chunks_count
284+
) < 0.3
285+
and
286+
promscale_sql_database_compression_status == 1
287+
)
288+
labels:
289+
severity: warning
290+
annotations:
291+
summary: Promscale compression ratio is low
292+
description: "Promscale compression ratio is low, with only {{ $value | humanizePercentage }} of total chunks being compressed."

go.sum

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
125125
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
126126
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
127127
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
128+
github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 h1:PnnQln5IGbhLeJOi6hVs+lCeF+B1dRfFKPGXUAez0Ww=
128129
github.com/Flaque/filet v0.0.0-20201012163910-45f684403088/go.mod h1:TK+jB3mBs+8ZMWhU5BqZKnZWJ1MrLo8etNVg51ueTBo=
129130
github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM=
130131
github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
@@ -543,7 +544,6 @@ github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BU
543544
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
544545
github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
545546
github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
546-
github.com/docker/docker v20.10.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
547547
github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
548548
github.com/docker/docker v20.10.12+incompatible h1:CEeNmFM0QZIsJCZKMkZx0ZcahTiewkrgiwfYD+dfl1U=
549549
github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
@@ -795,8 +795,8 @@ github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhY
795795
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8=
796796
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
797797
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
798-
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
799798
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
799+
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
800800
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
801801
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
802802
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
@@ -1161,8 +1161,6 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y
11611161
github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE=
11621162
github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y=
11631163
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
1164-
github.com/inhies/go-bytesize v0.0.0-20201103132853-d0aed0d254f8 h1:RrGCja4Grfz7QM2hw+SUZIYlbHoqBfbvzlWRT3seXB8=
1165-
github.com/inhies/go-bytesize v0.0.0-20201103132853-d0aed0d254f8/go.mod h1:KrtyD5PFj++GKkFS/7/RRrfnRhAMGQwy75GLCHWrCNs=
11661164
github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743 h1:X3Xxno5Ji8idrNiUoFc7QyXpqhSYlDRYQmc7mlpMBzU=
11671165
github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743/go.mod h1:KrtyD5PFj++GKkFS/7/RRrfnRhAMGQwy75GLCHWrCNs=
11681166
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
@@ -1180,8 +1178,6 @@ github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8
11801178
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
11811179
github.com/jackc/pgconn v1.11.0 h1:HiHArx4yFbwl91X3qqIHtUFoiIfLNJXCQRsnzkiwwaQ=
11821180
github.com/jackc/pgconn v1.11.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
1183-
github.com/jackc/pgerrcode v0.0.0-20190803225404-afa3381909a6 h1:geJ1mgTGd0WQo67wEd+H4OjFG5uA2e3cEBz9D5+pftU=
1184-
github.com/jackc/pgerrcode v0.0.0-20190803225404-afa3381909a6/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds=
11851181
github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451 h1:WAvSpGf7MsFuzAtK4Vk7R4EVe+liW4x83r4oWu0WHKw=
11861182
github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds=
11871183
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
@@ -1466,7 +1462,6 @@ github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0Gq
14661462
github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM=
14671463
github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
14681464
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
1469-
github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM=
14701465
github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
14711466
github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI=
14721467
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
@@ -1617,8 +1612,6 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw
16171612
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
16181613
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
16191614
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
1620-
github.com/pbnjay/memory v0.0.0-20201129165224-b12e5d931931 h1:EeWknjeRU+R3O4ghG7XZCpgSfJNStZyEP8aWyQwJM8s=
1621-
github.com/pbnjay/memory v0.0.0-20201129165224-b12e5d931931/go.mod h1:RMU2gJXhratVxBDTFeOdNhd540tG57lt9FIUV0YLvIQ=
16221615
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=
16231616
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=
16241617
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
@@ -1902,8 +1895,6 @@ github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ
19021895
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
19031896
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4=
19041897
github.com/tencentyun/cos-go-sdk-v5 v0.7.31/go.mod h1:4E4+bQ2gBVJcgEC9Cufwylio4mXOct2iu05WjgEBx1o=
1905-
github.com/testcontainers/testcontainers-go v0.10.1-0.20210318151656-2bbeb1e04514 h1:Gw0AVZdk8yF5sJL50bGWv8cZqYZn55JisAdT9rrvJVc=
1906-
github.com/testcontainers/testcontainers-go v0.10.1-0.20210318151656-2bbeb1e04514/go.mod h1:zFYk0JndthnMHEwtVRHCpLwIP/Ik1G7mvIAQ2MdZ+Ig=
19071898
github.com/testcontainers/testcontainers-go v0.12.0 h1:SK0NryGHIx7aifF6YqReORL18aGAA4bsDPtikDVCEyg=
19081899
github.com/testcontainers/testcontainers-go v0.12.0/go.mod h1:SIndOQXZng0IW8iWU1Js0ynrfZ8xcxrTtDfF6rD2pxs=
19091900
github.com/thanos-io/thanos v0.8.1-0.20200109203923-552ffa4c1a0d/go.mod h1:usT/TxtJQ7DzinTt+G9kinDQmRS5sxwu0unVKZ9vdcw=
@@ -2514,8 +2505,6 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
25142505
golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
25152506
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
25162507
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2517-
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c=
2518-
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
25192508
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 h1:nhht2DYV/Sn3qOayu8lM+cU1ii9sTLUeBQwQQfUHtrs=
25202509
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
25212510
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=

pkg/pgmodel/metrics/database/database.go

Lines changed: 79 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,53 @@ package database
33
import (
44
"context"
55
"fmt"
6-
"sync"
6+
"sync/atomic"
77
"time"
88

9+
"github.com/jackc/pgx/v4"
910
"github.com/prometheus/client_golang/prometheus"
1011

1112
"github.com/timescale/promscale/pkg/log"
1213
"github.com/timescale/promscale/pkg/pgxconn"
1314
)
1415

1516
type Engine interface {
16-
Start()
17-
Stop()
17+
Run()
18+
IsRunning() bool
1819
}
1920

2021
type metricsEngineImpl struct {
21-
conn pgxconn.PgxConn
22-
metrics []metricQueryWrap
23-
stop chan struct{}
22+
conn pgxconn.PgxConn
23+
ctx context.Context
24+
isRunning atomic.Value
25+
metrics []metricQueryWrap
2426
}
2527

2628
// NewEngine creates an engine that performs database metrics evaluation every evalInterval.
27-
// Make sure to call this only when the database is TimescaleDB. Plain Postgres
29+
// The engine runs predefined queries that returns a BIGINT as the metric value
30+
// which is then set as a value to Prometheus metric.
31+
//
32+
// Note: Make sure to call this only when the database is TimescaleDB. Plain Postgres
2833
// will cause evaluation errors.
29-
func NewEngine(conn pgxconn.PgxConn) *metricsEngineImpl {
30-
return &metricsEngineImpl{
34+
func NewEngine(ctx context.Context, conn pgxconn.PgxConn) *metricsEngineImpl {
35+
engine := &metricsEngineImpl{
3136
conn: conn,
37+
ctx: ctx,
3238
metrics: metrics,
33-
stop: make(chan struct{}),
3439
}
40+
engine.isRunning.Store(false)
41+
return engine
3542
}
3643

3744
func (e *metricsEngineImpl) register() {
3845
prometheus.MustRegister(getMetrics(e.metrics)...)
3946
}
4047

4148
func (e *metricsEngineImpl) unregister() {
42-
prometheus.MustRegister(getMetrics(e.metrics)...)
49+
m := getMetrics(e.metrics)
50+
for i := range m {
51+
prometheus.Unregister(m[i])
52+
}
4353
}
4454

4555
func getMetrics(m []metricQueryWrap) []prometheus.Collector {
@@ -50,49 +60,79 @@ func getMetrics(m []metricQueryWrap) []prometheus.Collector {
5060
return metrics
5161
}
5262

53-
const sqlMetricsEvalInterval = time.Second * 3
63+
const (
64+
timeout = time.Minute
65+
evalInterval = time.Minute * 3
66+
retry = time.Minute * 10
67+
stopThreshold = 5
68+
)
5469

55-
func (e *metricsEngineImpl) Start() {
70+
func (e *metricsEngineImpl) Run() {
5671
e.register()
5772
go func() {
58-
evaluate := time.NewTicker(sqlMetricsEvalInterval)
59-
defer evaluate.Stop()
60-
numQueries := len(e.metrics)
61-
62-
evalContext, stopEvaluation := context.WithCancel(context.Background())
73+
timeoutCount := 0
74+
e.isRunning.Store(true)
75+
up.Set(1)
76+
defer func() {
77+
e.isRunning.Store(false)
78+
up.Set(0)
79+
}()
6380
for {
64-
// Run for once during start.
65-
wg := new(sync.WaitGroup)
66-
wg.Add(numQueries)
81+
batch := e.conn.NewBatch()
6782
for i := range e.metrics {
68-
go evalMetric(evalContext, e.conn, wg, &e.metrics[i])
83+
batch.Queue(e.metrics[i].query)
84+
}
85+
86+
batchCtx, cancelBatch := context.WithTimeout(e.ctx, timeout)
87+
results, err := e.conn.SendBatch(batchCtx, batch)
88+
if err != nil || batchCtx.Err() != nil {
89+
timeoutCount++
90+
log.Warn("msg", "error evaluating the batch", "err batch", err.Error(), "err batch context", batchCtx.Err())
91+
}
92+
handleResults(results, e.metrics)
93+
if err := results.Close(); err != nil {
94+
log.Warn("msg", "error closing batch", "err", err.Error())
95+
}
96+
97+
cancelBatch() // Release resources if any.
98+
wait := evalInterval
99+
if timeoutCount > stopThreshold {
100+
// Stop the metrics engine temporarily if the batch times out beyond stopThreshold consecutively.
101+
log.Warn("msg", fmt.Sprintf("Database metric evaluation taking more time than expected. Stopping evaluation temporarily for %f minutes", retry.Minutes()))
102+
timeoutCount = 0
103+
wait = retry
104+
up.Set(0)
69105
}
70-
wg.Wait()
71106
select {
72-
case <-e.stop:
73-
stopEvaluation()
107+
case <-e.ctx.Done():
108+
e.unregister()
74109
return
75-
case <-evaluate.C:
110+
case <-time.After(wait):
111+
up.Set(1)
76112
}
77113
}
78114
}()
79115
}
80116

81-
func evalMetric(ctx context.Context, conn pgxconn.PgxConn, wg *sync.WaitGroup, metric *metricQueryWrap) {
82-
defer func() {
83-
wg.Done()
84-
}()
85-
var value int64
86-
err := conn.QueryRow(ctx, metric.query).Scan(&value)
87-
if err != nil {
88-
if metric.isHealthCheck {
89-
dbHealthErrors.Inc()
90-
updateMetric(metric.metric, 1) // Update the health_check counter.
117+
func (e *metricsEngineImpl) IsRunning() bool {
118+
return e.isRunning.Load().(bool)
119+
}
120+
121+
func handleResults(results pgx.BatchResults, m []metricQueryWrap) {
122+
for i := range m {
123+
metric := m[i]
124+
value := int64(0)
125+
err := results.QueryRow().Scan(&value)
126+
if err != nil {
127+
if metric.isHealthCheck {
128+
dbHealthErrors.Inc()
129+
updateMetric(metric.metric, 1)
130+
}
131+
log.Warn("msg", fmt.Sprintf("error evaluating database metric: %s", metric.metric), "err", err.Error())
132+
return
91133
}
92-
log.Warn("msg", fmt.Sprintf("error evaluating database metric: %s", metric.metric), "err", err.Error())
93-
return
134+
updateMetric(metric.metric, value)
94135
}
95-
updateMetric(metric.metric, value)
96136
}
97137

98138
func updateMetric(m prometheus.Collector, value int64) {
@@ -105,8 +145,3 @@ func updateMetric(m prometheus.Collector, value int64) {
105145
panic(fmt.Sprintf("metric %s is of type %T", m, m))
106146
}
107147
}
108-
109-
func (e *metricsEngineImpl) Stop() {
110-
close(e.stop)
111-
e.unregister()
112-
}

0 commit comments

Comments
 (0)