Tankcorn/preview observability streaming#6411
Tankcorn/preview observability streaming#6411Ankcorn wants to merge 6 commits intocloudflare:mainfrom
Conversation
9722d3a to
c848ed4
Compare
|
|
||
| JSG_MEMORY_INFO(Preview) { | ||
| tracker.trackField("id", id); | ||
| tracker.trackField("slug", slug); | ||
| tracker.trackField("name", name); | ||
| } |
There was a problem hiding this comment.
| JSG_MEMORY_INFO(Preview) { | |
| tracker.trackField("id", id); | |
| tracker.trackField("slug", slug); | |
| tracker.trackField("name", name); | |
| } |
Not needed
There was a problem hiding this comment.
When I removed these I think it broke the build
Error while processing /home/runner/.cache/bazel/_bazel_runner/be54bd8ac890d1817c772d91eb8f6cb4/sandbox/linux-sandbox/7561/execroot/_main/src/workerd/api/trace.c++.
bazel-out/k8-fastbuild/bin/src/workerd/jsg/_virtual_includes/memory-tracker/workerd/jsg/memory.h:234:8: note: candidate template ignored: could not match 'const kj::Table<T, Indexes...>' against 'const workerd::api::TracePreviewInfo'
234 | void trackField(kj::StringPtr edgeName,
| ^
I have kept them in for now but if there is something I should be doing instead please lmk
7bf88e0 to
d65f6ca
Compare
d65f6ca to
eba5d79
Compare
Merging this PR will improve performance by 15.28%
Performance Changes
Comparing Footnotes
|
|
/bonk review |
There was a problem hiding this comment.
Clean, well-structured change. The preview metadata is threaded through all the right layers (capnp schema, C++ serialization/deserialization, clone, streaming tail JS serialization) following the same pattern as scriptVersion. Tests cover the capnp round-trip and clone for the Onset path.
One minor nit (not blocking): The comment on TracePreview in src/workerd/io/trace.h:434 says "Describes a buffered tail worker request" which doesn't accurately describe what it represents. Since it holds preview deployment metadata (id, slug, name), something like "Describes preview deployment metadata associated with a worker" would be clearer. This predates your PR but worth fixing while you're touching this area.
|
Review submitted. Here's a summary of my findings: Verdict: Approved The PR cleanly adds preview deployment metadata (id, slug, name) to the streaming tail worker onset event. It touches all the right layers:
The implementation follows the exact same pattern as |
This PR adds preview metadata to the streaming tail worker onset event.
It follows the same pattern already used for
scriptVersion: the metadata is attached toOnset::WorkerInfo, serialized through the onset RPCpayload, and exposed in the JS event delivered to streaming tail workers.
What changed
Streaming tail onset events now include: