Skip to content

Commit

Permalink
Remove in memory sink from fanout and add latency sampling methods
Browse files Browse the repository at this point in the history
  • Loading branch information
lcwik committed Jan 17, 2024
1 parent 7f8562d commit 5877dab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions telemetry/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ func New(cfg Config) (_ *Metrics, rerr error) {
}

m := &Metrics{sink: sink}
fanout := metrics.FanoutSink{sink}

if cfg.PrometheusRetentionTime > 0 {
m.prometheusEnabled = true
Expand All @@ -148,10 +147,10 @@ func New(cfg Config) (_ *Metrics, rerr error) {
return nil, err
}

fanout = append(fanout, promSink)
sink = promSink
}

if _, err := metrics.NewGlobal(metricsConf, fanout); err != nil {
if _, err := metrics.NewGlobal(metricsConf, sink); err != nil {
return nil, err
}

Expand Down

0 comments on commit 5877dab

Please sign in to comment.