aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
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/initializers
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/initializers')
-rw-r--r--server/initializers/checker-before-init.ts1
-rw-r--r--server/initializers/config.ts4
2 files changed, 5 insertions, 0 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index 74fed251c..1351749a6 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -23,6 +23,7 @@ function checkMissedConfig () {
23 'log.log_ping_requests', 'log.log_tracker_unknown_infohash', 'log.prettify_sql', 'log.accept_client_log', 23 'log.log_ping_requests', 'log.log_tracker_unknown_infohash', 'log.prettify_sql', 'log.accept_client_log',
24 'open_telemetry.metrics.enabled', 'open_telemetry.metrics.prometheus_exporter.hostname', 24 'open_telemetry.metrics.enabled', 'open_telemetry.metrics.prometheus_exporter.hostname',
25 'open_telemetry.metrics.prometheus_exporter.port', 'open_telemetry.tracing.enabled', 'open_telemetry.tracing.jaeger_exporter.endpoint', 25 'open_telemetry.metrics.prometheus_exporter.port', 'open_telemetry.tracing.enabled', 'open_telemetry.tracing.jaeger_exporter.endpoint',
26 'open_telemetry.metrics.http_request_duration.enabled',
26 'user.video_quota', 'user.video_quota_daily', 27 'user.video_quota', 'user.video_quota_daily',
27 'video_channels.max_per_user', 28 'video_channels.max_per_user',
28 'csp.enabled', 'csp.report_only', 'csp.report_uri', 29 'csp.enabled', 'csp.report_only', 'csp.report_uri',
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 7ad258f7a..eb9d0079c 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -195,6 +195,10 @@ const CONFIG = {
195 METRICS: { 195 METRICS: {
196 ENABLED: config.get<boolean>('open_telemetry.metrics.enabled'), 196 ENABLED: config.get<boolean>('open_telemetry.metrics.enabled'),
197 197
198 HTTP_REQUEST_DURATION: {
199 ENABLED: config.get<boolean>('open_telemetry.metrics.http_request_duration.enabled')
200 },
201
198 PROMETHEUS_EXPORTER: { 202 PROMETHEUS_EXPORTER: {
199 HOSTNAME: config.get<string>('open_telemetry.metrics.prometheus_exporter.hostname'), 203 HOSTNAME: config.get<string>('open_telemetry.metrics.prometheus_exporter.hostname'),
200 PORT: config.get<number>('open_telemetry.metrics.prometheus_exporter.port') 204 PORT: config.get<number>('open_telemetry.metrics.prometheus_exporter.port')