From 6e435288020152a55f11bd931c40d2986bb60dbb Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 6 Nov 2025 11:48:20 -0500 Subject: [PATCH] [skip ci] Adjust telemetry for OTF streams to debug --- CHANGELOG.md | 4 ++- .../Services/Innertube/PlayerEndpoint.bs | 36 +++++++++++++++++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46742753..1334492e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Nothing worth mentioning yet. +### Fixed + +- Adjust telemetry for OTF streams to debug ## [0.43.6] - 2025-11-06 diff --git a/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs b/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs index 31083989..df276aec 100644 --- a/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs +++ b/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs @@ -756,7 +756,17 @@ namespace Innertube end if if not response.IsSuccess() - LogError("Failed to fetch OTF segment info for itag", format.itag, response.ErrorMessage()) + LogErrorNoTelemetry("Failed to fetch OTF segment info for itag", format.itag, response.ErrorMessage()) + LogTelemetryEvent({ + level: "error" + message: `Failed to fetch OTF segment info for itag ${format.itag}` + fingerprint: ["OTF Fetch Error"] + attachments: [{ + filename: "otf.txt" + content_type: "plain/text" + data: response.ErrorMessage() + }] + }) continue for end if @@ -764,7 +774,21 @@ namespace Innertube segmentDurationsMs = StringUtils.GetBetween(responseText, "Segment-Durations-Ms:", `\r\n`) if StringUtils.IsNullOrEmpty(segmentDurationsMs) - LogError("Failed to extract Segment-Durations-Ms from OTF stream for itag", format.itag) + LogErrorNoTelemetry("Failed to extract Segment-Durations-Ms from OTF stream for itag", format.itag) + LogTelemetryEvent({ + level: "error" + message: `Failed to extract Segment-Durations-Ms from OTF stream for itag ${format.itag}` + fingerprint: ["OTF Missing Segment Durations"] + attachments: [{ + filename: "otf.txt" + content_type: "plain/text" + data: responseText + }, { + filename: "headers.json" + content_type: "application/json" + data: FormatJson(response.Headers()) + }] + }) continue for end if @@ -793,6 +817,10 @@ namespace Innertube filename: "otf.txt" content_type: "plain/text" data: responseText + }, { + filename: "headers.json" + content_type: "application/json" + data: FormatJson(response.Headers()) }] }) continue for @@ -816,6 +844,10 @@ namespace Innertube filename: "otf.txt" content_type: "plain/text" data: responseText + }, { + filename: "headers.json" + content_type: "application/json" + data: FormatJson(response.Headers()) }] }) end if