feat: Conditionally emit metrics based on enablement (backport #19903) (#20017)

Co-authored-by: Lucas Francisco López <lucaslopezf@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2024-04-12 12:13:28 +02:00
committed by GitHub
co-authored by Lucas Francisco López Julien Robert
parent f76c659fd2
commit 974a24c58c
20 changed files with 116 additions and 37 deletions
-4
View File
@@ -536,10 +536,6 @@ func startAPIServer(
}
func startTelemetry(cfg serverconfig.Config) (*telemetry.Metrics, error) {
if !cfg.Telemetry.Enabled {
return nil, nil
}
return telemetry.New(cfg.Telemetry)
}