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: '' 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 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(); } 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 }); }); 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( { 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) => {