From 0931ab2ca40cf7c343f7078eea50523981ee04f5 Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Wed, 12 Jul 2023 09:50:22 -0700 Subject: [PATCH 1/6] delete stale.yml --- .github/workflows/stale.yml | 45 ------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 43dbbd0088bd..000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: 'close stale issues/PRs' -on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: -jobs: - stale: - runs-on: ubuntu-20.04 - steps: - - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 - with: - repo-token: ${{ github.token }} - days-before-stale: 21 - days-before-close: 7 - only-labels: '' - operations-per-run: 100 - remove-stale-when-updated: true - debug-only: false - ascending: false - - exempt-issue-labels: 'Status: Backlog,Status: In Progress' - stale-issue-label: 'Status: Stale' - stale-issue-message: |- - This issue has gone three weeks without activity. In another week, I will close it. - - But! If you comment or otherwise update it, I will reset the clock, and if you label it `Status: Backlog` or `Status: In Progress`, I will leave it alone ... forever! - - ---- - - "A weed is but an unloved flower." ― _Ella Wheeler Wilcox_ 🥀 - close-issue-label: '' - close-issue-message: '' - - exempt-pr-labels: 'Status: Backlog,Status: In Progress' - stale-pr-label: 'Status: Stale' - stale-pr-message: |- - This pull request has gone three weeks without activity. In another week, I will close it. - - But! If you comment or otherwise update it, I will reset the clock, and if you label it `Status: Backlog` or `Status: In Progress`, I will leave it alone ... forever! - - ---- - - "A weed is but an unloved flower." ― _Ella Wheeler Wilcox_ 🥀 - close-pr-label: - close-pr-message: '' From 6be123e3952459bc6a626f36d4a958d20ece8705 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 12 Jul 2023 12:59:28 -0400 Subject: [PATCH 2/6] test(replay): skip `captures multiple multi clicks` on firefox and webkit (#8514) --- .../suites/replay/slowClick/multiClick/test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts b/packages/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts index 82bc436f714e..86582bf98153 100644 --- a/packages/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts +++ b/packages/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts @@ -64,8 +64,9 @@ sentryTest('captures multi click when not detecting slow click', async ({ getLoc ]); }); -sentryTest('captures multiple multi clicks', async ({ getLocalTestUrl, page, forceFlushReplay }) => { - if (shouldSkipReplayTest()) { +sentryTest('captures multiple multi clicks', async ({ getLocalTestUrl, page, forceFlushReplay, browserName }) => { + // This test seems to only be flakey on firefox and webkit + if (shouldSkipReplayTest() || ['firefox', 'webkit'].includes(browserName)) { sentryTest.skip(); } From 5f7a0fb280ef98473f8ea5cc0b7a34056f4b3429 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 12 Jul 2023 13:00:35 -0400 Subject: [PATCH 3/6] fix(node): Set propagation context even when tracingOptions are not defined (#8517) --- packages/node/src/handlers.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/node/src/handlers.ts b/packages/node/src/handlers.ts index 6d2545c3bf9d..1d1ef3bed507 100644 --- a/packages/node/src/handlers.ts +++ b/packages/node/src/handlers.ts @@ -53,15 +53,6 @@ export function tracingHandler(): ( return next(); } - if (!hasTracingEnabled(options)) { - __DEBUG_BUILD__ && - logger.warn( - 'Sentry `tracingHandler` is being used, but tracing is disabled. Please enable tracing by setting ' + - 'either `tracesSampleRate` or `tracesSampler` in your `Sentry.init()` options.', - ); - return next(); - } - const sentryTrace = req.headers && isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined; const baggage = req.headers?.baggage; const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders( @@ -70,6 +61,10 @@ export function tracingHandler(): ( ); hub.getScope().setPropagationContext(propagationContext); + if (!hasTracingEnabled(options)) { + return next(); + } + const [name, source] = extractPathForTransaction(req, { path: true, method: true }); const transaction = startTransaction( { From f0862a19df95a36473268c0d2ab5b4807ad6b1c5 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 12 Jul 2023 13:10:11 -0400 Subject: [PATCH 4/6] chore(core): Remove eslint warnings (#8515) --- packages/core/test/lib/base.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/test/lib/base.test.ts b/packages/core/test/lib/base.test.ts index 162b53e4bb51..eed6b4cb3a2f 100644 --- a/packages/core/test/lib/base.test.ts +++ b/packages/core/test/lib/base.test.ts @@ -1673,7 +1673,7 @@ describe('BaseClient', () => { }), ); - // @ts-ignore + // @ts-expect-error Accessing private transport API const mockSend = jest.spyOn(client._transport, 'send'); const errorEvent: Event = { message: 'error' }; @@ -1701,7 +1701,7 @@ describe('BaseClient', () => { }), ); - // @ts-ignore + // @ts-expect-error Accessing private transport API const mockSend = jest.spyOn(client._transport, 'send'); const transactionEvent: Event = { type: 'transaction', event_id: 'tr1' }; @@ -1731,7 +1731,7 @@ describe('BaseClient', () => { }), ); - // @ts-ignore + // @ts-expect-error Accessing private transport API const mockSend = jest.spyOn(client._transport, 'send').mockImplementation(() => { return Promise.reject('send error'); }); @@ -1763,7 +1763,7 @@ describe('BaseClient', () => { }), ); - // @ts-ignore + // @ts-expect-error Accessing private transport API const mockSend = jest.spyOn(client._transport, 'send').mockImplementation(() => { return Promise.resolve({ statusCode: 200 }); }); From a05c225ecdcde3e076507af6485c898521897759 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 12 Jul 2023 13:22:08 -0400 Subject: [PATCH 5/6] chore(tracing-internal): Fix eslint warning (#8516) --- packages/tracing-internal/src/node/integrations/prisma.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/tracing-internal/src/node/integrations/prisma.ts b/packages/tracing-internal/src/node/integrations/prisma.ts index 458e0f304ebe..359ff887b024 100644 --- a/packages/tracing-internal/src/node/integrations/prisma.ts +++ b/packages/tracing-internal/src/node/integrations/prisma.ts @@ -65,6 +65,7 @@ export class Prisma implements Integration { // https://github.com/getsentry/sentry-javascript/issues/7216#issuecomment-1602375012 // In the future we might explore providing a dedicated PrismaClient middleware instead of this hack. if (isValidPrismaClient(options.client) && !options.client._sentryInstrumented) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any addNonEnumerableProperty(options.client as any, '_sentryInstrumented', true); options.client.$use((params, next: (params: PrismaMiddlewareParams) => Promise) => { From e8113fe6bfeb385638951b5576683b597c6af506 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 13 Jul 2023 09:51:28 +0200 Subject: [PATCH 6/6] meta(changelog): Update changelog for 7.58.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d53c9fa7fc4..5b7a9fe0e146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 7.58.1 + +- fix(node): Set propagation context even when tracingOptions are not defined (#8517) + ## 7.58.0 ### Important Changes