From 0ad1bb3d3a6c247a170c138a7a80ec5c77fa33e0 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 10 May 2024 15:00:13 +0000 Subject: [PATCH 1/3] chore: Resolve or postpone a random assortment of TODOs --- .../nextjs-app-dir/tests/pages-ssr-errors.test.ts | 5 ++--- .../nextjs/test/integration/test/client/tracingFetch.test.ts | 4 ++-- packages/node/src/transports/http.ts | 2 +- packages/types/src/envelope.ts | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts index 3e6396c4a618..3741f973e684 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts @@ -40,7 +40,6 @@ test('Will capture error for SSR rendering error with a connected trace (Functio expect(errorEvent.tags?.['my-isolated-tag']).toBe(true); expect(errorEvent.tags?.['my-global-scope-isolated-tag']).not.toBeDefined(); - // TODO(lforst): Reuse SSR request span isolation scope to fix the following two assertions - // expect(ssrTransaction.tags?.['my-isolated-tag']).toBe(true); - // expect(ssrTransaction.tags?.['my-global-scope-isolated-tag']).not.toBeDefined(); + expect(ssrTransaction.tags?.['my-isolated-tag']).toBe(true); + expect(ssrTransaction.tags?.['my-global-scope-isolated-tag']).not.toBeDefined(); }); diff --git a/packages/nextjs/test/integration/test/client/tracingFetch.test.ts b/packages/nextjs/test/integration/test/client/tracingFetch.test.ts index debff6001fce..4d7b416a17dd 100644 --- a/packages/nextjs/test/integration/test/client/tracingFetch.test.ts +++ b/packages/nextjs/test/integration/test/client/tracingFetch.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { SerializedEvent } from '@sentry/types'; +import { Event } from '@sentry/types'; import { countEnvelopes, getMultipleSentryEnvelopeRequests } from './utils/helpers'; test('should correctly instrument `fetch` for performance tracing', async ({ page }) => { @@ -12,7 +12,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag }); }); - const transaction = await getMultipleSentryEnvelopeRequests(page, 1, { + const transaction = await getMultipleSentryEnvelopeRequests(page, 1, { url: '/fetch', envelopeType: 'transaction', }); diff --git a/packages/node/src/transports/http.ts b/packages/node/src/transports/http.ts index d4d7435bdc6d..d1828b856c5f 100644 --- a/packages/node/src/transports/http.ts +++ b/packages/node/src/transports/http.ts @@ -73,7 +73,7 @@ export function makeNodeTransport(options: NodeTransportOptions): Transport { const nativeHttpModule = isHttps ? https : http; const keepAlive = options.keepAlive === undefined ? false : options.keepAlive; - // TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node + // TODO(v9): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node // versions(>= 8) as they had memory leaks when using it: #2555 const agent = proxy ? (new HttpsProxyAgent(proxy) as http.Agent) diff --git a/packages/types/src/envelope.ts b/packages/types/src/envelope.ts index 358f60ccee18..61d3b7d38a1d 100644 --- a/packages/types/src/envelope.ts +++ b/packages/types/src/envelope.ts @@ -83,7 +83,6 @@ type StatsdItemHeaders = { type: 'statsd'; length: number }; type ProfileItemHeaders = { type: 'profile' }; type SpanItemHeaders = { type: 'span' }; -// TODO (v8): Replace `Event` with `SerializedEvent` export type EventItem = BaseEnvelopeItem; export type AttachmentItem = BaseEnvelopeItem; export type UserFeedbackItem = BaseEnvelopeItem; From 1ee0c21f8ab678b5771e0a2de6eda3cfdf0a9763 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 10 May 2024 15:00:38 +0000 Subject: [PATCH 2/3] one more --- packages/nextjs/src/common/withServerActionInstrumentation.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/nextjs/src/common/withServerActionInstrumentation.ts b/packages/nextjs/src/common/withServerActionInstrumentation.ts index e70e1682aa9c..109743eea01a 100644 --- a/packages/nextjs/src/common/withServerActionInstrumentation.ts +++ b/packages/nextjs/src/common/withServerActionInstrumentation.ts @@ -15,7 +15,6 @@ import { escapeNextjsTracing } from './utils/tracingUtils'; interface Options { formData?: FormData; - // TODO(v8): Whenever we decide to drop support for Next.js <= 12 we can automatically pick up the headers becauase "next/headers" will be resolvable. headers?: Headers; recordResponse?: boolean; } From dafa0a4fdaed668b34826e079f016c4c37aa5747 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 14 May 2024 10:37:21 +0000 Subject: [PATCH 3/3] undo --- .../nextjs-app-dir/tests/pages-ssr-errors.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts index 3741f973e684..3e6396c4a618 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts @@ -40,6 +40,7 @@ test('Will capture error for SSR rendering error with a connected trace (Functio expect(errorEvent.tags?.['my-isolated-tag']).toBe(true); expect(errorEvent.tags?.['my-global-scope-isolated-tag']).not.toBeDefined(); - expect(ssrTransaction.tags?.['my-isolated-tag']).toBe(true); - expect(ssrTransaction.tags?.['my-global-scope-isolated-tag']).not.toBeDefined(); + // TODO(lforst): Reuse SSR request span isolation scope to fix the following two assertions + // expect(ssrTransaction.tags?.['my-isolated-tag']).toBe(true); + // expect(ssrTransaction.tags?.['my-global-scope-isolated-tag']).not.toBeDefined(); });