getsentry / getsentry/sentry-javascript

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

オープン
#24,146 コメント 1 件 リアクション 0 件 担当者 1 名 @JPeer264 が担当を希望しています GitHub で見る
javascript Task
主要言語
TypeScript
スター
8.7k
フォーク
1.8k
平均マージ
1日 17時間
マージ済み PR(30日)
523

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。