Uh oh!
There was an error while loading. Please reload this page.
test(e2e): Port the React Router instrumentation API E2E app to span streaming - #23845
Conversation
size-limit report 📦
|
75dab6a to
ae51708Compare2f982ae to
a9e6808Compareae51708 to
537187fComparecf5c7f9 to
9e03698Compare47e95de to
5ecb95aCompare9e03698 to
edd1076CompareUh oh!
There was an error while loading. Please reload this page.
edd1076 to
7d44686Compare54e87cd to
adf8c96CompareThere was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7d44686. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
adf8c96 to
e2c7572Compared638522 to
979eaa0Comparee2c7572 to
05a6dbdCompare979eaa0 to
01f6e5dCompare4736942 to
7700c10Compare01f6e5d to
9d1bbdaCompare7700c10 to
06f7731Compare9d1bbda to
1db63f1Compare…streaming Removes the `traceLifecycle: 'static'` pin from `react-router-7-framework-instrumentation` and rewrites its specs against streamed span v2. Loader, action, middleware and fetcher assertions now walk the streamed trace instead of a transaction's `spans` array. The orchestrion mysql spec matches on `db.query.text`, since a streamed mysql span is named after its query summary.
06f7731 to
bd73839Compare1db63f1 to
107a1e4Compare| 'sentry.origin': { value: 'auto.db.redis', type: 'string' }, | ||
| 'db.system.name': { value: 'redis', type: 'string' }, | ||
| 'db.operation.name': { value: 'set', type: 'string' }, | ||
| 'db.query.text': { value: 'set test-key [1 other arguments]', type: 'string' }, |
There was a problem hiding this comment.
note for myself: #23741 needs to update these tests for the new span name. Let's merge your PR first. I'd actually appreciate more tests on the redis db span rename PR anyway!
| /** Every span below `rootSpan`, following `parent_span_id` down the tree. */ | ||
| function descendantsOf(spans: SerializedStreamedSpan[], rootSpan: SerializedStreamedSpan): SerializedStreamedSpan[] { |
There was a problem hiding this comment.
l: It took me quite a bit to understand this function. two suggestions:
- can we call it
getChildSpansOf- which is what I think this function does - rename
rootSpantoparentSpan- because rootSpan is an overloaded term and I thought for a second this would be a segment span. but IIUC the fetcherSpan below is also just a child span and we want children of that span, correct?
There was a problem hiding this comment.
Renamed the parameter to parentSpan as suggested, and went with getDescendantSpansOf rather than getChildSpansOf because the walk is transitive: it collects spans nested several levels below, not just direct children. And yes, the fetcher span is itself a child span, not a segment.
| 'code.function.name': 'lazy', | ||
| }, | ||
| description: 'Lazy Route Load', | ||
| name: 'Lazy Route Load', |
There was a problem hiding this comment.
side-comment: This is a bit of a weird span name and made me realize we don't yet have name/description rules for function spans 🙃 will add to #22350
`rootSpan` read as a segment span, which the fetcher span is not, and the name did not say the walk is transitive.
Uh oh!
There was an error while loading. Please reload this page.
…streaming (#23845) ## What Ports `react-router-7-framework-instrumentation` to span streaming. ## Why Span streaming is the default now, so the E2E suite has to exercise it. Loader, action, middleware and fetcher assertions walk the streamed trace instead of a transaction's `spans` array, and the orchestrion mysql spec matches on `db.query.text`, since a streamed mysql span is named after its query summary. Part of #23798

What
Ports
react-router-7-framework-instrumentationto span streaming.Why
Span streaming is the default now, so the E2E suite has to exercise it. Loader, action, middleware and fetcher assertions walk the streamed trace instead of a transaction's
spansarray, and the orchestrion mysql spec matches ondb.query.text, since a streamed mysql span is named after its query summary.Part of #23798