diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-12 16:41:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-16 10:33:27 +0200 |
commit | fd3c2e87051f5029cdec39d877b576a62f48e219 (patch) | |
tree | a3c657f178702a3363af680ed8ffb7cd038243b8 /shared/models/metrics | |
parent | 0e6cd1c00f71554fe7375a96db693a6983951ba6 (diff) | |
download | PeerTube-fd3c2e87051f5029cdec39d877b576a62f48e219.tar.gz PeerTube-fd3c2e87051f5029cdec39d877b576a62f48e219.tar.zst PeerTube-fd3c2e87051f5029cdec39d877b576a62f48e219.zip |
Add playback metric endpoint sent to OTEL
Diffstat (limited to 'shared/models/metrics')
-rw-r--r-- | shared/models/metrics/index.ts | 1 | ||||
-rw-r--r-- | shared/models/metrics/playback-metric-create.model.ts | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/shared/models/metrics/index.ts b/shared/models/metrics/index.ts new file mode 100644 index 000000000..24194cce3 --- /dev/null +++ b/shared/models/metrics/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './playback-metric-create.model' | |||
diff --git a/shared/models/metrics/playback-metric-create.model.ts b/shared/models/metrics/playback-metric-create.model.ts new file mode 100644 index 000000000..d669ab690 --- /dev/null +++ b/shared/models/metrics/playback-metric-create.model.ts | |||
@@ -0,0 +1,19 @@ | |||
1 | import { VideoResolution } from '../videos' | ||
2 | |||
3 | export interface PlaybackMetricCreate { | ||
4 | playerMode: 'p2p-media-loader' | 'webtorrent' | ||
5 | |||
6 | resolution?: VideoResolution | ||
7 | fps?: number | ||
8 | |||
9 | resolutionChanges: number | ||
10 | |||
11 | errors: number | ||
12 | |||
13 | downloadedBytesP2P: number | ||
14 | downloadedBytesHTTP: number | ||
15 | |||
16 | uploadedBytesP2P: number | ||
17 | |||
18 | videoId: number | string | ||
19 | } | ||