Skip to content
Closed
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
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,50 @@

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

## 9.41.0

### Important Changes

- **feat(v9/core): Deprecate experimental `enableLogs` and `beforeSendLog` option ([#17092](https://github.com/getsentry/sentry-javascript/pull/17092))**

Sentry now has support for [structured logging](https://docs.sentry.io/product/explore/logs/getting-started/). Previously to enable structured logging, you had to use the `_experiments.enableLogs` and `_experiments.beforeSendLog` options. These options have been deprecated in favor of the top-level `enableLogs` and `beforeSendLog` options.

```js
// before
Sentry.init({
_experiments: {
enableLogs: true,
beforeSendLog: log => {
return log;
},
},
});

// after
Sentry.init({
enableLogs: true,
beforeSendLog: log => {
return log;
},
});
```

- **feat(astro): Implement parameterized routes**
- feat(v9/astro): Parametrize dynamic server routes ([#17141](https://github.com/getsentry/sentry-javascript/pull/17141))
- feat(v9/astro): Parametrize routes on client-side ([#17143](https://github.com/getsentry/sentry-javascript/pull/17143))

Server-side and client-side parameterized routes are now supported in the Astro SDK. No configuration changes are required.

### Other Changes

- feat(v9/node): Add shouldHandleError option to fastifyIntegration ([#17123](https://github.com/getsentry/sentry-javascript/pull/17123))
- fix(v9/cloudflare) Allow non UUID workflow instance IDs ([#17135](https://github.com/getsentry/sentry-javascript/pull/17135))
- fix(v9/node): Ensure tool errors for `vercelAiIntegration` have correct trace ([#17142](https://github.com/getsentry/sentry-javascript/pull/17142))
- fix(v9/remix): Ensure source maps upload fails silently if Sentry CLI fails ([#17095](https://github.com/getsentry/sentry-javascript/pull/17095))
- fix(v9/svelte): Do not insert preprocess code in script module in Svelte 5 ([#17124](https://github.com/getsentry/sentry-javascript/pull/17124))

Work in this release was contributed by @richardjelinek-fastest. Thank you for your contribution!

## 9.40.0

### Important Changes
Expand Down
24 changes: 24 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,30 @@ logger.info('This is an info message');
debug.log('This is an info message');
```

## Deprecated `_experiments.enableLogs` and `_experiments.beforeSendLog` options

The `_experiments.enableLogs` and `_experiments.beforeSendLog` options have been deprecated in favor of the top-level `enableLogs` and `beforeSendLog` options.

```js
// before
Sentry.init({
_experiments: {
enableLogs: true,
beforeSendLog: log => {
return log;
},
},
});

// after
Sentry.init({
enableLogs: true,
beforeSendLog: log => {
return log;
},
});
```

# Upgrading from 8.x to 9.x

Version 9 of the Sentry JavaScript SDK primarily introduces API cleanup and version support changes.
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/browser-integration-tests",
"version": "9.40.0",
"version": "9.41.0",
"main": "index.js",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "~1.53.2",
"@sentry-internal/rrweb": "2.34.0",
"@sentry/browser": "9.40.0",
"@sentry/browser": "9.41.0",
"@supabase/supabase-js": "2.49.3",
"axios": "1.8.2",
"babel-loader": "^8.2.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
_experiments: {
enableLogs: true,
},
enableLogs: true,
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
_experiments: {
enableLogs: true,
},
enableLogs: true,
integrations: [Sentry.consoleLoggingIntegration()],
});
2 changes: 1 addition & 1 deletion dev-packages/bundle-analyzer-scenarios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/bundle-analyzer-scenarios",
"version": "9.40.0",
"version": "9.41.0",
"description": "Scenarios to test bundle analysis with",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/clear-cache-gh-action/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/clear-cache-gh-action",
"description": "An internal Github Action to clear GitHub caches.",
"version": "9.40.0",
"version": "9.41.0",
"license": "MIT",
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/e2e-tests",
"version": "9.40.0",
"version": "9.41.0",
"license": "MIT",
"private": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export const prerender = false;

export function GET({ params }) {
return new Response(
JSON.stringify({
greeting: `Hello ${params.userId}`,
userId: params.userId,
}),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
import Layout from '../../layouts/Layout.astro';

export const prerender = false;

const params = Astro.params;

---

<Layout title="CatchAll SSR page">
<p>params: {params}</p>
</Layout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import Layout from '../../layouts/Layout.astro';

export const prerender = false;

const { userId } = Astro.params;

const response = await fetch(Astro.url.origin + `/api/user/${userId}.json`)
const data = await response.json();

---

<Layout title="Dynamic SSR page">
<h1>{data.greeting}</h1>

<p>data: {JSON.stringify(data)}</p>
</Layout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
import Layout from '../../layouts/Layout.astro';
export const prerender = false;
---

<Layout title="User Settings">
<h1>User Settings</h1>
</Layout>
Loading
Loading