getsentry / getsentry/sentry-javascript

cloudflare-integration-tests: add shared streamed-span helpers to the runner

Đang mở
#24,146 1 bình luận 0 reaction 1 người được giao Được @JPeer264 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)
523

Mô tả

Blocks the other two sub-issues.

This package has no shared span assertion helpers. `suites/public-api/startSpan-streamed/test.ts` and `suites/tracing/ignoreSpans-streamed/test.ts` each define their own local `getSpanContainer(envelope)`, which will not scale to 80 ported files.

## What to do

Add helpers next to `runner.ts` and `expect.ts`, mirroring what the other packages already have:

* node uses `.expect({ span })` in `utils/runner/createRunner.ts`, which gives a `SerializedStreamedSpanContainer`
* browser uses `waitForStreamedSpan` / `waitForStreamedSpans` / `waitForStreamedSpanEnvelope` in `utils/spanUtils.ts`

At minimum this package needs: pull the span container out of an envelope, find a span by op or name, and collect spans across several envelopes, since streamed child spans do not all arrive in one envelope.

Port the two existing `-streamed` suites onto the new helpers in the same PR so the shape is proven before the bulk work starts.

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.