Skip to content

Commit ed078d6

Browse files
Lms24cursoragent
andauthored
test(cloudflare): Disable span streaming in integration tests (#22594)
Add the missing Cloudflare integration-test slice from #22577. Non-streaming suites now explicitly stay on the static trace lifecycle, while the suites that specifically exercise span streaming remain unchanged. This is preparation to enabling span streaming by default. Once enabled, we'll gradually migrate transaction-based tests over to streaming. Refs #22344 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e888e15 commit ed078d6

71 files changed

Lines changed: 92 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dev-packages/cloudflare-integration-tests/suites/basic/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface Env {
77
export default Sentry.withSentry(
88
(env: Env) => ({
99
dsn: env.SENTRY_DSN,
10+
traceLifecycle: 'static',
1011
}),
1112
{
1213
async fetch(_request, _env, _ctx) {

dev-packages/cloudflare-integration-tests/suites/d1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ interface Env {
99
export default Sentry.withSentry(
1010
(env: Env) => ({
1111
dsn: env.SENTRY_DSN,
12+
traceLifecycle: 'static',
1213
tracesSampleRate: 1,
1314
}),
1415
{

dev-packages/cloudflare-integration-tests/suites/double-instrumentation/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ const handler = {
1717
// This simulates scenarios where the module is re-evaluated or the handler
1818
// is wrapped multiple times. The SDK should handle this gracefully
1919
// without double-wrapping (which would cause duplicate error reports).
20-
const once = Sentry.withSentry((env: Env) => ({ dsn: env.SENTRY_DSN }), handler);
21-
export default Sentry.withSentry((env: Env) => ({ dsn: env.SENTRY_DSN }), once);
20+
const once = Sentry.withSentry((env: Env) => ({ dsn: env.SENTRY_DSN, traceLifecycle: 'static' }), handler);
21+
export default Sentry.withSentry((env: Env) => ({ dsn: env.SENTRY_DSN, traceLifecycle: 'static' }), once);

dev-packages/cloudflare-integration-tests/suites/hono-sdk/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const app = new Hono<{ Bindings: Env }>();
1010
app.use(
1111
sentry(app, {
1212
dsn: process.env.SENTRY_DSN,
13+
traceLifecycle: 'static',
1314
tracesSampleRate: 1.0,
1415
}),
1516
);

dev-packages/cloudflare-integration-tests/suites/integrations/http-server-disabled/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface Env {
77
export default Sentry.withSentry(
88
(env: Env) => ({
99
dsn: env.SENTRY_DSN,
10+
traceLifecycle: 'static',
1011
integrations: [Sentry.httpServerIntegration({ maxRequestBodySize: 'none' })],
1112
}),
1213
{

dev-packages/cloudflare-integration-tests/suites/integrations/http-server-filtered/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface Env {
77
export default Sentry.withSentry(
88
(env: Env) => ({
99
dsn: env.SENTRY_DSN,
10+
traceLifecycle: 'static',
1011
integrations: integrations => integrations.filter(i => i.name !== 'HttpServer'),
1112
}),
1213
{

dev-packages/cloudflare-integration-tests/suites/integrations/http-server-ignore/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface Env {
77
export default Sentry.withSentry(
88
(env: Env) => ({
99
dsn: env.SENTRY_DSN,
10+
traceLifecycle: 'static',
1011
integrations: [
1112
Sentry.httpServerIntegration({
1213
ignoreRequestBody: url => url.includes('/health') || url.includes('/upload'),

dev-packages/cloudflare-integration-tests/suites/integrations/http-server-small/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface Env {
77
export default Sentry.withSentry(
88
(env: Env) => ({
99
dsn: env.SENTRY_DSN,
10+
traceLifecycle: 'static',
1011
integrations: [Sentry.httpServerIntegration({ maxRequestBodySize: 'small' })],
1112
}),
1213
{

dev-packages/cloudflare-integration-tests/suites/integrations/http-server/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default Sentry.withSentry(
88
(env: Env) => ({
99
dsn: env.SENTRY_DSN,
1010
attachStacktrace: false,
11+
traceLifecycle: 'static',
1112
}),
1213
{
1314
async fetch(request, _env, _ctx) {

dev-packages/cloudflare-integration-tests/suites/prisma/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interface Env {
1111
export default Sentry.withSentry(
1212
(env: Env) => ({
1313
dsn: env.SENTRY_DSN,
14+
traceLifecycle: 'static',
1415
tracesSampleRate: 1,
1516
integrations: [Sentry.prismaIntegration()],
1617
}),

0 commit comments

Comments
 (0)