From 8d1f78044ca6eb9995001d3ab83be62460e043a6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Feb 2023 13:53:54 +0100 Subject: Add ability to disable http duration OTEL metrics --- server/lib/opentelemetry/metrics.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/lib/opentelemetry/metrics.ts') diff --git a/server/lib/opentelemetry/metrics.ts b/server/lib/opentelemetry/metrics.ts index 9cc067e4a..bffe00840 100644 --- a/server/lib/opentelemetry/metrics.ts +++ b/server/lib/opentelemetry/metrics.ts @@ -62,7 +62,9 @@ class OpenTelemetryMetrics { this.meter = metrics.getMeter('default') - this.buildRequestObserver() + if (CONFIG.OPEN_TELEMETRY.METRICS.HTTP_REQUEST_DURATION.ENABLED === true) { + this.buildRequestObserver() + } this.playbackMetrics = new PlaybackMetrics(this.meter) this.playbackMetrics.buildCounters() -- cgit v1.2.3