getsentry / getsentry/sentry-javascript

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

未关闭
#24,146 1 条评论 0 个 reaction 已指派 1 人 已被 @JPeer264 认领 在 GitHub 查看
javascript Task
主要语言
TypeScript
星标
8.7k
派生
1.8k
平均合并
1 天 17 小时
30 天内合并 PR
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 摘要。