From fd3c2e87051f5029cdec39d877b576a62f48e219 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 12 Aug 2022 16:41:29 +0200 Subject: Add playback metric endpoint sent to OTEL --- shared/models/index.ts | 1 + shared/models/metrics/index.ts | 1 + shared/models/metrics/playback-metric-create.model.ts | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 shared/models/metrics/index.ts create mode 100644 shared/models/metrics/playback-metric-create.model.ts (limited to 'shared/models') diff --git a/shared/models/index.ts b/shared/models/index.ts index 78723d830..439e9c8e1 100644 --- a/shared/models/index.ts +++ b/shared/models/index.ts @@ -6,6 +6,7 @@ export * from './custom-markup' export * from './feeds' export * from './http' export * from './joinpeertube' +export * from './metrics' export * from './moderation' export * from './overviews' export * from './plugins' 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 @@ +import { VideoResolution } from '../videos' + +export interface PlaybackMetricCreate { + playerMode: 'p2p-media-loader' | 'webtorrent' + + resolution?: VideoResolution + fps?: number + + resolutionChanges: number + + errors: number + + downloadedBytesP2P: number + downloadedBytesHTTP: number + + uploadedBytesP2P: number + + videoId: number | string +} -- cgit v1.2.3