Tankcorn/preview observability streaming#6524
Merged
Conversation
Adds preview field to the TailStream Onset event interface so TypeScript users can access preview metadata (id, slug, name) in streaming tail workers.
Contributor
|
OK, same pattern. That's fine -- both Everything looks clean. No logic bugs, no security issues, no backward compat violations, no missing compat flags. The code follows existing patterns, tests cover the serialization roundtrip, and the TS types are correctly propagated. LGTM |
danlapid
approved these changes
Apr 8, 2026
NuroDev
approved these changes
Apr 8, 2026
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 preview identity metadata (id, slug, name) to streaming tail worker (STW) onset events. This allows streaming tail workers to identify when they're observing a preview Worker and
which preview it is.
Classic (buffered) tail workers already have access to trace.preview — this PR extends the same metadata to the streaming path.
Motivation
Workers Previews let developers test changes before deploying to production. Streaming tail workers currently have no way to distinguish preview invocations from production ones. This
change exposes preview metadata on the onset event so observability tooling can correctly attribute and filter preview traffic.
Changes
Streaming tail worker onset events
TypeScript types
Tests
API