Skip to content

Commit ad82dad

Browse files
authored
Merge pull request #9771 from getsentry/prepare-release/7.86.0
meta(changelog): Update changelog for 7.86.0
2 parents 829a15c + 1132994 commit ad82dad

File tree

35 files changed

+471
-135
lines changed

35 files changed

+471
-135
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,7 @@ jobs:
976976
runs-on: ubuntu-20.04
977977
timeout-minutes: 30
978978
if: |
979-
contains(github.event.pull_request.labels.*.name, 'ci-overhead-measurements') ||
980-
needs.job_get_metadata.outputs.is_develop == 'true'
979+
contains(github.event.pull_request.labels.*.name, 'ci-overhead-measurements')
981980
steps:
982981
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
983982
uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 7.86.0
8+
9+
- feat(core): Use SDK_VERSION for hub API version (#9732)
10+
- feat(nextjs): Emit warning if your app directory doesn't have a global-error.js file (#9753)
11+
- feat(node): Add cloudflare pages commit sha (#9751)
12+
- feat(remix): Bump @sentry/cli to 2.22.3 (#9741)
13+
- fix(nextjs): Don't accidentally trigger static generation bailout (#9749)
14+
- fix(node): Guard `process.env.NODE_ENV` access in Spotlight integration (#9748)
15+
- fix(utils): Fix XHR instrumentation early return (#9770)
16+
- ref(remix): Rework Error Handling (#9725)
17+
718
## 7.85.0
819

920
- feat(core): Add `addEventProcessor` method (#9554)

docs/using-yalc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ to add the local SDK package to your project.
4343

4444
### My changes are not applied to the test project
4545

46-
Did you run `yarn build && yarn publish:yalc` after making your changes?
46+
Did you run `yarn build && yarn yalc:publish` after making your changes?
4747

4848
### My test project uses Vite and I still don't see changes
4949

packages/astro/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
- [Official SDK Docs](https://docs.sentry.io/platforms/javascript/guides/astro/)
1616

17-
## Experimental Note
17+
## SDK Status
1818

19-
This SDK is experimental and in Alpha state. Breaking changes can occurr at any time.
19+
This SDK is in Beta and not yet fully stable.
2020
If you have feedback or encounter any bugs, feel free to [open an issue](https://github.com/getsentry/sentry-javascript/issues/new/choose).
2121

2222
## General
@@ -58,9 +58,9 @@ SENTRY_AUTH_TOKEN="your-token"
5858

5959
### Server Instrumentation
6060

61-
For Astro apps configured for (hybrid) Server Side Rendering (SSR), the Sentry integration will automatically add middleware to your server to instrument incoming requests **if you're using Astro 3.5.0 or newer**.
61+
For Astro apps configured for (hybrid) Server Side Rendering (SSR), the Sentry integration will automatically add middleware to your server to instrument incoming requests **if you're using Astro 3.5.2 or newer**.
6262

63-
If you're using Astro <3.5.0, complete the setup by adding the Sentry middleware to your `src/middleware.js` file:
63+
If you're using Astro <3.5.2, complete the setup by adding the Sentry middleware to your `src/middleware.js` file:
6464

6565
```javascript
6666
// src/middleware.js

packages/core/src/hub.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { DEFAULT_ENVIRONMENT } from './constants';
2626
import { DEBUG_BUILD } from './debug-build';
2727
import { Scope } from './scope';
2828
import { closeSession, makeSession, updateSession } from './session';
29+
import { SDK_VERSION } from './version';
2930

3031
/**
3132
* API compatibility version of this hub.
@@ -35,7 +36,7 @@ import { closeSession, makeSession, updateSession } from './session';
3536
*
3637
* @hidden
3738
*/
38-
export const API_VERSION = 4;
39+
export const API_VERSION = parseFloat(SDK_VERSION);
3940

4041
/**
4142
* Default maximum number of breadcrumbs added to an event. Can be overwritten

packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.server.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ Sentry.init({
2424
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!
2525
});
2626

27-
export function handleError(error: unknown, { request }: DataFunctionArgs): void {
28-
Sentry.captureRemixServerException(error, 'remix.server', request);
29-
}
27+
export const handleError = Sentry.wrapRemixHandleError;
3028

3129
export default function handleRequest(
3230
request: Request,

packages/e2e-tests/test-applications/create-remix-app/app/entry.server.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ Sentry.init({
2121
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!
2222
});
2323

24-
export function handleError(error: unknown, { request }: DataFunctionArgs): void {
25-
Sentry.captureRemixServerException(error, 'remix.server', request);
26-
}
24+
export const handleError = Sentry.wrapRemixHandleError;
2725

2826
export default function handleRequest(
2927
request: Request,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { NextResponse } from 'next/server';
2+
3+
export async function GET() {
4+
return NextResponse.json({ result: 'static response' });
5+
}
6+
7+
// This export makes it so that this route is always dynamically rendered (i.e Sentry will trace)
8+
export const revalidate = 0;
9+
10+
// This export makes it so that this route will throw an error if the Request object is accessed in some way.
11+
export const dynamic = 'error';

packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,10 @@ test.describe('Edge runtime', () => {
9494
expect(routehandlerError.contexts?.runtime?.name).toBe('vercel-edge');
9595
});
9696
});
97+
98+
test('should not crash route handlers that are configured with `export const dynamic = "error"`', async ({
99+
request,
100+
}) => {
101+
const response = await request.get('/route-handlers/static');
102+
expect(await response.json()).toStrictEqual({ result: 'static response' });
103+
});

packages/nextjs/src/common/types.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,19 @@ export type ServerComponentContext = {
1818
};
1919

2020
export interface RouteHandlerContext {
21-
// TODO(v8): Remove
22-
/**
23-
* @deprecated The SDK will automatically pick up the method from the incoming Request object instead.
24-
*/
2521
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
2622
parameterizedRoute: string;
2723
// TODO(v8): Remove
2824
/**
29-
* @deprecated The SDK will automatically pick up the `sentry-trace` header from the incoming Request object instead.
25+
* @deprecated pass a complete `Headers` object with the `headers` field instead.
3026
*/
3127
sentryTraceHeader?: string;
3228
// TODO(v8): Remove
3329
/**
34-
* @deprecated The SDK will automatically pick up the `baggage` header from the incoming Request object instead.
30+
* @deprecated pass a complete `Headers` object with the `headers` field instead.
3531
*/
3632
baggageHeader?: string;
33+
headers?: WebFetchHeaders;
3734
}
3835

3936
export type VercelCronsConfig = { path?: string; schedule?: string }[] | undefined;

0 commit comments

Comments
 (0)