aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-05 15:43:21 +0200
committerChocobozzz <me@florianbigard.com>2022-07-06 15:13:55 +0200
commit630d0a1bf5897fff203cb07e426223f55dcc882d (patch)
tree5e6fa9d26f3f21178a538bd1ac38fa0a3f4f228c /server/initializers
parent15b43b214eb37b05aa65aa8ef61fd0e6aa0b62d2 (diff)
downloadPeerTube-630d0a1bf5897fff203cb07e426223f55dcc882d.tar.gz
PeerTube-630d0a1bf5897fff203cb07e426223f55dcc882d.tar.zst
PeerTube-630d0a1bf5897fff203cb07e426223f55dcc882d.zip
Introduce experimental telemetry
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/config.ts16
-rw-r--r--server/initializers/constants.ts3
2 files changed, 18 insertions, 1 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 754585981..0943ffe2d 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -167,6 +167,22 @@ const CONFIG = {
167 LOG_TRACKER_UNKNOWN_INFOHASH: config.get<boolean>('log.log_tracker_unknown_infohash'), 167 LOG_TRACKER_UNKNOWN_INFOHASH: config.get<boolean>('log.log_tracker_unknown_infohash'),
168 PRETTIFY_SQL: config.get<boolean>('log.prettify_sql') 168 PRETTIFY_SQL: config.get<boolean>('log.prettify_sql')
169 }, 169 },
170 OPEN_TELEMETRY: {
171 METRICS: {
172 ENABLED: config.get<boolean>('open_telemetry.metrics.enabled'),
173
174 PROMETHEUS_EXPORTER: {
175 PORT: config.get<number>('open_telemetry.metrics.prometheus_exporter.port')
176 }
177 },
178 TRACING: {
179 ENABLED: config.get<boolean>('open_telemetry.tracing.enabled'),
180
181 JAEGER_EXPORTER: {
182 ENDPOINT: config.get<string>('open_telemetry.tracing.jaeger_exporter.endpoint')
183 }
184 }
185 },
170 TRENDING: { 186 TRENDING: {
171 VIDEOS: { 187 VIDEOS: {
172 INTERVAL_DAYS: config.get<number>('trending.videos.interval_days'), 188 INTERVAL_DAYS: config.get<number>('trending.videos.interval_days'),
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index c6989c38b..e3683269c 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -736,7 +736,8 @@ const MEMOIZE_TTL = {
736 INFO_HASH_EXISTS: 1000 * 3600 * 12, // 12 hours 736 INFO_HASH_EXISTS: 1000 * 3600 * 12, // 12 hours
737 VIDEO_DURATION: 1000 * 10, // 10 seconds 737 VIDEO_DURATION: 1000 * 10, // 10 seconds
738 LIVE_ABLE_TO_UPLOAD: 1000 * 60, // 1 minute 738 LIVE_ABLE_TO_UPLOAD: 1000 * 60, // 1 minute
739 LIVE_CHECK_SOCKET_HEALTH: 1000 * 60 // 1 minute 739 LIVE_CHECK_SOCKET_HEALTH: 1000 * 60, // 1 minute
740 GET_STATS_FOR_OPEN_TELEMETRY_METRICS: 1000 * 60 // 1 minute
740} 741}
741 742
742const MEMOIZE_LENGTH = { 743const MEMOIZE_LENGTH = {