Commit d9cd3a0
test(cloudflare): Port the request handler suites to span streaming (#24196)
Ports the remaining request handler suites off the `traceLifecycle:
'static'` pin: `hono-sdk`, `double-instrumentation` and
`public-api/metrics/server-address`.
`double-instrumentation` and the metrics suite assert on an error event
and on a metric envelope, so only the pin goes. `double-instrumentation`
swaps its `ignore('transaction')` for `ignore('span')`, which is the
envelope the `http.server` span now races the error event with.
The Hono routes are parametrized patterns, so their segment names
survive streaming unchanged. What does change is the status: span v2
carries the coarse `error` on the span and the specific `internal_error`
in the `sentry.status.message` attribute.
## Static trace lifecycle guard
`suites/basic` keeps the static pin as the package's guard. It is the
smallest suite that still covers a plain worker fetch, so it is the
cheapest one to keep on the old lifecycle.
## Suite left behind
`suites/request-handler/subpath` also stays pinned, but not by choice.
With the pin removed, `wrapRequestHandler` from
`@sentry/cloudflare/request` still sends a transaction envelope. That
holds with `traceLifecycle: 'stream'` passed explicitly and with
`cacheClient: false`, and the transaction's own
`sentry.sdk.integrations` lists `SpanStreaming` — so the client the
event is processed by does have streaming on, while `getClient()` inside
`_onSpanEnded` does not see a streaming client and falls through to
`_convertSpanToTransaction`. Every other entry point in the package
streams, and they differ only in which default integration set they
inject, so this looks like a gap in the `/request` entry rather than a
test problem. It is tracked separately and the suite is left as it was.
Fixes #24148
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 3740892 commit d9cd3a0
5 files changed
Lines changed: 32 additions & 65 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
Lines changed: 27 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 48 | + | |
52 | 49 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
69 | 62 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 63 | + | |
83 | 64 | | |
84 | 65 | | |
85 | 66 | | |
| |||
91 | 72 | | |
92 | 73 | | |
93 | 74 | | |
94 | | - | |
95 | | - | |
| 75 | + | |
96 | 76 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
115 | 86 | | |
116 | | - | |
| 87 | + | |
117 | 88 | | |
118 | | - | |
119 | 89 | | |
120 | 90 | | |
121 | 91 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
0 commit comments