Add --replay-all to browsers telemetry stream#189
Open
archandatta wants to merge 6 commits into
Open
Conversation
Add --replay-all to `browsers telemetry stream`, forwarding replay=all so the stream starts from the oldest retained event instead of from-now. Mutually exclusive with --seq. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
🔧 CI Fix Available I've pushed a fix for the CI failure. The build broke because The fix implements |
The replay=all wire value is shared with the browser image with no generated enum tying them; name it and document the contract. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Exposes the telemetry stream replay param. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Get gained a query params argument in the SDK bump; thread it through the service interface, call site, and test fake. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
rgarcia
requested changes
Jun 25, 2026
rgarcia
left a comment
Contributor
There was a problem hiding this comment.
reviewed with live QA. one correctness issue to fix before this ships:
cmd/browsers_telemetry.go:181—--replay-all --seq=-1is accepted and replays from the oldest retained event, even though the new help/docs say--replay-allis mutually exclusive with--seq. consider tracking whether--seqwas explicitly provided (for example fromcmd.Flags().Changed("seq")) and rejecting the combination based on flag presence, not justSeq != -1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
--replay-alltokernel browsers telemetry stream <id>, the CLI surface for telemetry replay-from-oldest. When set, it forwardsreplay=allso the stream starts from the oldest retained ring-buffer event instead of from-now.--replay-allbool flag, mutually exclusive with--seq(one starts from the oldest retained event, the other resumes after a specific sequence).--seq->Last-Event-ID,--replay-all->replay=all(named constantreplayAllValue, since the wire value is shared with the browser image with no generated enum tying them).kernel-go-sdkto v0.70.0 (exposes theReplayparam). The bump also required a small unrelated adaptation toAPIKeyService.Get(gained a params arg), kept as its own commit.Sequencing (KERNEL-1351): kernel-images replay (shipped) -> kernel/kernel #2381 (merged + deployed) -> kernel-go-sdk v0.70.0 (published) -> this PR.
Test plan
go build ./...+go test ./cmd/...green (SDK bumped to v0.70.0)Live test results
Built
bin/kernelatkernel-go-sdk v0.70.0and ran against production.Flag / validation (these fire before any network call):
--help--replay-all--replay-all --seq 5--replay-all --seq 0--seq -2/--seq 0--categories bogus-o yamlLive end-to-end (created a headless browser with
--telemetry all, generated ~7api_callevents, then deleted the browser):--replay-allseq 1--seq 3seq 4 -> 8seq 10(the post-connect event), not 1-7Not exercised live: eviction (replay-all's first
seq> 1 once the 1024-event ring overflows) needs >1024 events; it is pure server behavior, already verified server-side, and the CLI just prints whatever frames the server returns.