Skip to content

meta(changelog): Update changelog for 7.58.1 #8524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions .github/workflows/stale.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
8 changes: 4 additions & 4 deletions packages/core/test/lib/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' };
Expand Down Expand Up @@ -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' };
Expand Down Expand Up @@ -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');
});
Expand Down Expand Up @@ -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 });
});
Expand Down
13 changes: 4 additions & 9 deletions packages/node/src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
{
Expand Down
1 change: 1 addition & 0 deletions packages/tracing-internal/src/node/integrations/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<unknown>) => {
Expand Down