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 /support/doc/api/openapi.yaml | |
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 'support/doc/api/openapi.yaml')
-rw-r--r-- | support/doc/api/openapi.yaml | 133 |
1 files changed, 95 insertions, 38 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 4402de954..5077f8d90 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -5009,6 +5009,21 @@ paths: | |||
5009 | '404': | 5009 | '404': |
5010 | description: plugin not found | 5010 | description: plugin not found |
5011 | 5011 | ||
5012 | /metrics/playback: | ||
5013 | post: | ||
5014 | summary: Create playback metrics | ||
5015 | description: These metrics are exposed by OpenTelemetry metrics exporter if enabled. | ||
5016 | tags: | ||
5017 | - Stats | ||
5018 | requestBody: | ||
5019 | content: | ||
5020 | application/json: | ||
5021 | schema: | ||
5022 | $ref: '#/components/schemas/PlaybackMetricCreate' | ||
5023 | responses: | ||
5024 | '204': | ||
5025 | description: successful operation | ||
5026 | |||
5012 | servers: | 5027 | servers: |
5013 | - url: 'https://peertube2.cpy.re/api/v1' | 5028 | - url: 'https://peertube2.cpy.re/api/v1' |
5014 | description: Live Test Server (live data - latest nightly version) | 5029 | description: Live Test Server (live data - latest nightly version) |
@@ -8195,44 +8210,86 @@ components: | |||
8195 | format: binary | 8210 | format: binary |
8196 | 8211 | ||
8197 | LiveVideoSessionResponse: | 8212 | LiveVideoSessionResponse: |
8198 | properties: | 8213 | properties: |
8199 | id: | 8214 | id: |
8200 | type: integer | 8215 | type: integer |
8201 | startDate: | 8216 | startDate: |
8202 | type: string | 8217 | type: string |
8203 | format: date-time | 8218 | format: date-time |
8204 | description: Start date of the live session | 8219 | description: Start date of the live session |
8205 | endDate: | 8220 | endDate: |
8206 | type: string | 8221 | type: string |
8207 | format: date-time | 8222 | format: date-time |
8208 | nullable: true | 8223 | nullable: true |
8209 | description: End date of the live session | 8224 | description: End date of the live session |
8210 | error: | 8225 | error: |
8211 | type: integer | 8226 | type: integer |
8212 | enum: | 8227 | enum: |
8213 | - 1 | 8228 | - 1 |
8214 | - 2 | 8229 | - 2 |
8215 | - 3 | 8230 | - 3 |
8216 | - 4 | 8231 | - 4 |
8217 | - 5 | 8232 | - 5 |
8218 | nullable: true | 8233 | nullable: true |
8219 | description: > | 8234 | description: > |
8220 | Error type if an error occurred during the live session: | 8235 | Error type if an error occurred during the live session: |
8221 | - `1`: Bad socket health (transcoding is too slow) | 8236 | - `1`: Bad socket health (transcoding is too slow) |
8222 | - `2`: Max duration exceeded | 8237 | - `2`: Max duration exceeded |
8223 | - `3`: Quota exceeded | 8238 | - `3`: Quota exceeded |
8224 | - `4`: Quota FFmpeg error | 8239 | - `4`: Quota FFmpeg error |
8225 | - `5`: Video has been blacklisted during the live | 8240 | - `5`: Video has been blacklisted during the live |
8226 | replayVideo: | 8241 | replayVideo: |
8227 | type: object | 8242 | type: object |
8228 | description: Video replay information | 8243 | description: Video replay information |
8229 | properties: | 8244 | properties: |
8230 | id: | 8245 | id: |
8231 | type: number | 8246 | type: number |
8232 | uuid: | 8247 | uuid: |
8233 | $ref: '#/components/schemas/UUIDv4' | 8248 | $ref: '#/components/schemas/UUIDv4' |
8234 | shortUUID: | 8249 | shortUUID: |
8235 | $ref: '#/components/schemas/shortUUID' | 8250 | $ref: '#/components/schemas/shortUUID' |
8251 | |||
8252 | PlaybackMetricCreate: | ||
8253 | properties: | ||
8254 | playerMode: | ||
8255 | type: string | ||
8256 | enum: | ||
8257 | - 'p2p-media-loader' | ||
8258 | - 'webtorrent' | ||
8259 | resolution: | ||
8260 | type: number | ||
8261 | description: Current player video resolution | ||
8262 | fps: | ||
8263 | type: number | ||
8264 | description: Current player video fps | ||
8265 | resolutionChanges: | ||
8266 | type: number | ||
8267 | description: How many resolution changes occured since the last metric creation | ||
8268 | errors: | ||
8269 | type: number | ||
8270 | description: How many errors occured since the last metric creation | ||
8271 | downloadedBytesP2P: | ||
8272 | type: number | ||
8273 | description: How many bytes were downloaded with P2P since the last metric creation | ||
8274 | downloadedBytesHTTP: | ||
8275 | type: number | ||
8276 | description: How many bytes were downloaded with HTTP since the last metric creation | ||
8277 | uploadedBytesP2P: | ||
8278 | type: number | ||
8279 | description: How many bytes were uploaded with P2P since the last metric creation | ||
8280 | videoId: | ||
8281 | oneOf: | ||
8282 | - $ref: '#/components/schemas/id' | ||
8283 | - $ref: '#/components/schemas/UUIDv4' | ||
8284 | - $ref: '#/components/schemas/shortUUID' | ||
8285 | required: | ||
8286 | - playerMode | ||
8287 | - resolutionChanges | ||
8288 | - errors | ||
8289 | - downloadedBytesP2P | ||
8290 | - downloadedBytesHTTP | ||
8291 | - uploadedBytesP2P | ||
8292 | - videoId | ||
8236 | 8293 | ||
8237 | callbacks: | 8294 | callbacks: |
8238 | searchIndex: | 8295 | searchIndex: |