getsentry / getsentry/sentry-javascript

Port Nuxt & Nitro E2E test apps to span streaming

Đang mở
#23,804 1 bình luận 0 reaction 1 người được giao Được @s1gr1d nhận Xem trên GitHub
javascript Task
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

Port these E2E test applications to span streaming (8 apps).

## Apps

* nitro-3
* nuxt-3
* nuxt-3-dynamic-import
* nuxt-3-min
* nuxt-3-top-level-import
* nuxt-4
* nuxt-4-cloudflare
* nuxt-5

## What to do

For each app:

1. Remove the `traceLifecycle: 'static'` pin added in #22590 from every `Sentry.init` (client, server, edge).
2. Rewrite the specs from transaction envelopes to span v2:
* `waitForTransaction` becomes `waitForStreamedSpan` / `waitForStreamedSpans`
* `event.transaction` becomes `span.name`
* `contexts.trace.op` becomes `getSpanOp(span)` plus `span.is_segment`
* `contexts.trace.data['x']` becomes `span.attributes['x']`, which has the shape `{ value, type }`
* `transaction_info.source` becomes the `sentry.segment.name.source` attribute
3. Streamed child spans arrive across several envelopes, so use `collectStreamedSpans` wherever a test asserts on children of a segment span.

Watch the low-cardinality names for `http.server` and for Nuxt db spans.

Reference apps: `nextjs-16-streaming` and `react-router-7-spa-streaming`. Worked example: getsentry/sentry-javascript#23797.

## Keep static trace lifecycle coverage

Before porting this group, duplicate `nuxt-4` as-is into `nuxt-4-static` and leave that copy on the current transaction-based specs. That keeps the static trace lifecycle covered once the rest of the group moves to streaming.

The copy is verbatim; only the app name changes:

* `package.json` -> `name`
* `start-event-proxy.mjs` -> `proxyServerName`
* every `waitForTransaction` / `waitForError` / `waitForSession` call in `tests/`

Keep `traceLifecycle: 'static'` in the copy's `Sentry.init` calls. The e2e matrix discovers apps by directory, so no CI config change is needed.

The representative is a suggestion: swap it if another app in the list exercises more of this SDK's instrumentation.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.