A play's trace holds only its report, not the playlist and audio it fetched #192

Closed
opened 2026-10-11 07:32:34 -07:00 by rays · 1 comment
Owner

Since #190 the page's API requests carry traceparent, one trace per tap. The first play_start report after the deploy (2026-10-11 14:30:25 UTC, 221 ms, DeadAir, enclosure 1381923) is trace 639bca9b34aee2324a39caaddf2d4777, which holds only POST /api/client: the playlist (deadair.m3u8) and audio (deadair.mp3) requests that tap made are traces of their own, since hls.js fetches them itself, and position saves go by sendBeacon, which cannot set a header. hls.js can add it (xhrSetup: xhr.setRequestHeader('traceparent', traceparent())); Safari's own player cannot, nor sendBeacon (a query parameter would do for both). Query: {container="iPX"} |= "play_start".

Since #190 the page's API requests carry traceparent, one trace per tap. The first play_start report after the deploy (2026-10-11 14:30:25 UTC, 221 ms, DeadAir, enclosure 1381923) is trace 639bca9b34aee2324a39caaddf2d4777, which holds only POST /api/client: the playlist (deadair.m3u8) and audio (deadair.mp3) requests that tap made are traces of their own, since hls.js fetches them itself, and position saves go by sendBeacon, which cannot set a header. hls.js can add it (xhrSetup: xhr.setRequestHeader('traceparent', traceparent())); Safari's own player cannot, nor sendBeacon (a query parameter would do for both). Query: {container="iPX"} |= "play_start".
rays added the enhancement label 2026-10-11 07:32:34 -07:00
Author
Owner

Fixed in cd9aef3, deployed: hls.js sends traceparent on its playlist and audio requests (xhrSetup), and a position beacon and Safari's own player, which cannot set a header, carry it in the query, which the server reads when there is no header. The browser test checks hls.js's audio request carries the trace of the tap. Not yet seen from a real play in production.

Fixed in cd9aef3, deployed: hls.js sends traceparent on its playlist and audio requests (xhrSetup), and a position beacon and Safari's own player, which cannot set a header, carry it in the query, which the server reads when there is no header. The browser test checks hls.js's audio request carries the trace of the tap. Not yet seen from a real play in production.
rays closed this issue 2026-10-11 07:43:39 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#192