diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-20 12:06:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-20 12:06:39 +0200 |
commit | 305facdfab1d5029366d2262ac390b9c71752e4b (patch) | |
tree | 799f7e5686d0ac0b9ff63a06e686d6f1093168bc /server/middlewares/validators/metrics.ts | |
parent | 4e5da193d0ef69f7fc0ee1e7eb14f03de4d7a938 (diff) | |
download | PeerTube-305facdfab1d5029366d2262ac390b9c71752e4b.tar.gz PeerTube-305facdfab1d5029366d2262ac390b9c71752e4b.tar.zst PeerTube-305facdfab1d5029366d2262ac390b9c71752e4b.zip |
Add peers number and p2p enabled label to metrics
Diffstat (limited to 'server/middlewares/validators/metrics.ts')
-rw-r--r-- | server/middlewares/validators/metrics.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/middlewares/validators/metrics.ts b/server/middlewares/validators/metrics.ts index 8ee5ac0d0..ced9afc69 100644 --- a/server/middlewares/validators/metrics.ts +++ b/server/middlewares/validators/metrics.ts | |||
@@ -12,6 +12,15 @@ const addPlaybackMetricValidator = [ | |||
12 | body('fps') | 12 | body('fps') |
13 | .optional() | 13 | .optional() |
14 | .isInt({ min: 0 }), | 14 | .isInt({ min: 0 }), |
15 | |||
16 | body('totalPeers') | ||
17 | .optional() | ||
18 | .isInt({ min: 0 }), | ||
19 | |||
20 | body('p2pEnabled') | ||
21 | .optional() | ||
22 | .isBoolean(), | ||
23 | |||
15 | body('playerMode') | 24 | body('playerMode') |
16 | .custom(isValidPlayerMode), | 25 | .custom(isValidPlayerMode), |
17 | 26 | ||