Uh oh!
There was an error while loading. Please reload this page.
test(e2e): Port SvelteKit E2E test apps to span streaming - #23936
Conversation
8c5d6d8 to
70d02efComparesize-limit report 📦
|
There 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 70d02ef. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
| 'http.method': { value: 'GET', type: 'string' }, | ||
| 'http.request.method': { value: 'GET', type: 'string' }, | ||
| 'http.route': { value: '/server-load-fetch', type: 'string' }, | ||
| 'sveltekit.tracing.original_name': { value: 'sveltekit.handle.root', type: 'string' }, |
There was a problem hiding this comment.
this still needed a conventions entry. Added here: getsentry/sentry-conventions#611, along with a few other attributes also found in other tests
| op: 'function', | ||
| description: 'sveltekit.resolve', | ||
| origin: 'auto.http.sveltekit', | ||
| name: 'sveltekit.resolve', |
There was a problem hiding this comment.
l: do we collect a code.function.name attribute for this as well? We still need to create function span name and description rules and I think we basically want to infer names based on the function name, so this needs to land in an attribute in addition to the span name.
If we don't, this is out of scope and should be tackled via #23954
There was a problem hiding this comment.
nope we just add op and origin for these
| * `sveltekit.resolve` span and therefore shares the trace with the server request. Stopping at | ||
| * segment boundaries keeps assertions on the server request's child spans free of browser spans. | ||
| */ | ||
| export function getSegmentChildSpans( |
There was a problem hiding this comment.
this is a good observation. Maybe we need some kind of helper that waits for an entire segment (across envelopes) but drops spans not belonging to the segment 🤔 This would avoid having to add this kind of function to meta framework e2e tests.
| '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.
heads-up: This PR needs a rebase and adjustments here because redis span names have changed via #23741
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xo7LcmA5Cte2uiSmp7hXSN
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xo7LcmA5Cte2uiSmp7hXSN
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replaces the per-app getSegmentChildSpans tree walk in the SvelteKit specs with a shared collector that groups streamed spans by their segment id. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
cf27128 to
3179d93Compare
Ports
sveltekit-2,sveltekit-2-kit-tracing,sveltekit-2-svelte-5,sveltekit-2.5.0-twp,sveltekit-3andsveltekit-cloudflare-pagesto span streaming, and addssveltekit-2-staticas a verbatim copy of the oldsveltekit-2(only the app name changed) to keep the static trace lifecycle covered.Decisions taken while porting:
sveltekit.resolvespan, so the whole request shares one trace. The kit-tracing and SvelteKit 3 specs use a smallgetSegmentChildSpanshelper that walks a segment's descendants without crossing into other segments, which keeps the exact child-span count assertions meaningful.routerspans are now namedRouter, browser fetch spansGET localhost, and mysql spans carry the query summary (SELECT) as name with the full text indb.query.text. Specs assert the new names and keep the old details as attributes.@sentry/cloudflarerequest span (GET, sourceurl); the SvelteKitGET /db-mysqlspan is its child. The db specs match on the trace instead of a transaction name.requestassertions on server transactions have no streamed equivalent and became assertions onhttp.request.methodandhttp.request.header.*attributes.closes#23808