Skip to content

Commit

Permalink
Update telemetry/metrics.go
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
itsdevbear and coderabbitai[bot] authored Dec 6, 2023
1 parent a8cc689 commit 52d7b96
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions telemetry/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,15 @@ func New(cfg Config) (_ *Metrics, rerr error) {
memSink := metrics.NewInmemSink(10*time.Second, time.Minute)
sink = memSink
inMemSig := metrics.DefaultInmemSignal(memSink)
defer func() {
if rerr != nil {
inMemSig.Stop()
}
case "mem":
memSink := metrics.NewInmemSink(10*time.Second, time.Minute)
sink = memSink
inMemSig := metrics.DefaultInmemSignal(memSink)
defer func() {
if rerr != nil {
inMemSig.Stop()
}
}()
}()
case "statsd":
var err error
Expand Down

0 comments on commit 52d7b96

Please sign in to comment.