getsentry / getsentry/sentry-javascript

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

Aperta
#24,146 1 commento 0 reazioni 1 assegnatario Rivendicata da @JPeer264 Vedi su GitHub
javascript Task
Lingua principale
TypeScript
Stelle
8.7k
Fork
1.8k
Merge medio
1g 17h
PR unite (30g)
523

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.