aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/opentelemetry
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-27 13:53:54 +0100
committerChocobozzz <me@florianbigard.com>2023-02-27 13:53:54 +0100
commit8d1f78044ca6eb9995001d3ab83be62460e043a6 (patch)
tree5b0cf63de96fdc67ef7aaa10af4969d9578406f0 /server/lib/opentelemetry
parent5b94394a1a6d471f897d14ac62fe7bec5f9a74c2 (diff)
downloadPeerTube-8d1f78044ca6eb9995001d3ab83be62460e043a6.tar.gz
PeerTube-8d1f78044ca6eb9995001d3ab83be62460e043a6.tar.zst
PeerTube-8d1f78044ca6eb9995001d3ab83be62460e043a6.zip
Add ability to disable http duration OTEL metrics
Diffstat (limited to 'server/lib/opentelemetry')
-rw-r--r--server/lib/opentelemetry/metrics.ts4
1 files changed, 3 insertions, 1 deletions
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 {
62 62
63 this.meter = metrics.getMeter('default') 63 this.meter = metrics.getMeter('default')
64 64
65 this.buildRequestObserver() 65 if (CONFIG.OPEN_TELEMETRY.METRICS.HTTP_REQUEST_DURATION.ENABLED === true) {
66 this.buildRequestObserver()
67 }
66 68
67 this.playbackMetrics = new PlaybackMetrics(this.meter) 69 this.playbackMetrics = new PlaybackMetrics(this.meter)
68 this.playbackMetrics.buildCounters() 70 this.playbackMetrics.buildCounters()