Skip to content

Commit f13e8c2

Browse files
authored
Merge branch 'develop' into fix/fetch-not-release
2 parents 3923ecb + b6dbde8 commit f13e8c2

File tree

10 files changed

+63
-196
lines changed

10 files changed

+63
-196
lines changed

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,56 @@
1010

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

13+
## 8.36.0
14+
15+
### Important Changes
16+
17+
- **feat(nuxt): Add Sentry Pinia plugin ([#14047](https://github.com/getsentry/sentry-javascript/pull/14047))**
18+
19+
The Nuxt SDK now allows you to track Pinia state for captured errors. To enable the Pinia plugin, set the `trackPinia` option to `true` in your client config:
20+
21+
```ts
22+
// sentry.client.config.ts
23+
24+
Sentry.init({
25+
trackPinia: true,
26+
});
27+
```
28+
29+
Read more about the Pinia plugin in the [Sentry Pinia Documentation](https://docs.sentry.io/platforms/javascript/guides/nuxt/features/pinia/).
30+
31+
- **feat(nextjs/vercel-edge/cloudflare): Switch to OTEL for performance monitoring ([#13889](https://github.com/getsentry/sentry-javascript/pull/13889))**
32+
33+
With this release, the Sentry Next.js, and Cloudflare SDKs will now capture performance data based on OpenTelemetry.
34+
Some exceptions apply in cases where Next.js captures inaccurate data itself.
35+
36+
NOTE: You may experience minor differences in transaction names in Sentry.
37+
Most importantly transactions for serverside pages router invocations will now be named `GET /[param]/my/route` instead of `/[param]/my/route`.
38+
This means that those transactions are now better aligned with the OpenTelemetry semantic conventions.
39+
40+
### Other Changes
41+
42+
- deps: Bump bundler plugins and CLI to 2.22.6 and 2.37.0 respectively ([#14050](https://github.com/getsentry/sentry-javascript/pull/14050))
43+
- feat(deps): bump @opentelemetry/instrumentation-aws-sdk from 0.44.0 to 0.45.0 ([#14099](https://github.com/getsentry/sentry-javascript/pull/14099))
44+
- feat(deps): bump @opentelemetry/instrumentation-connect from 0.39.0 to 0.40.0 ([#14101](https://github.com/getsentry/sentry-javascript/pull/14101))
45+
- feat(deps): bump @opentelemetry/instrumentation-express from 0.43.0 to 0.44.0 ([#14102](https://github.com/getsentry/sentry-javascript/pull/14102))
46+
- feat(deps): bump @opentelemetry/instrumentation-fs from 0.15.0 to 0.16.0 ([#14098](https://github.com/getsentry/sentry-javascript/pull/14098))
47+
- feat(deps): bump @opentelemetry/instrumentation-kafkajs from 0.3.0 to 0.4.0 ([#14100](https://github.com/getsentry/sentry-javascript/pull/14100))
48+
- feat(nextjs): Add method and url to route handler request data ([#14084](https://github.com/getsentry/sentry-javascript/pull/14084))
49+
- feat(node): Add breadcrumbs for `child_process` and `worker_thread` ([#13896](https://github.com/getsentry/sentry-javascript/pull/13896))
50+
- fix(core): Ensure standalone spans are not sent if SDK is disabled ([#14088](https://github.com/getsentry/sentry-javascript/pull/14088))
51+
- fix(nextjs): Await flush in api handlers ([#14023](https://github.com/getsentry/sentry-javascript/pull/14023))
52+
- fix(nextjs): Don't leak webpack types into exports ([#14116](https://github.com/getsentry/sentry-javascript/pull/14116))
53+
- fix(nextjs): Fix matching logic for file convention type for root level components ([#14038](https://github.com/getsentry/sentry-javascript/pull/14038))
54+
- fix(nextjs): Respect directives in value injection loader ([#14083](https://github.com/getsentry/sentry-javascript/pull/14083))
55+
- fix(nuxt): Only wrap `.mjs` entry files in rollup ([#14060](https://github.com/getsentry/sentry-javascript/pull/14060))
56+
- fix(nuxt): Re-export all exported bindings ([#14086](https://github.com/getsentry/sentry-javascript/pull/14086))
57+
- fix(nuxt): Server-side setup in readme ([#14049](https://github.com/getsentry/sentry-javascript/pull/14049))
58+
- fix(profiling-node): Always warn when running on incompatible major version of Node.js ([#14043](https://github.com/getsentry/sentry-javascript/pull/14043))
59+
- fix(replay): Fix `onError` callback ([#14002](https://github.com/getsentry/sentry-javascript/pull/14002))
60+
- perf(otel): Only calculate current timestamp once ([#14094](https://github.com/getsentry/sentry-javascript/pull/14094))
61+
- test(browser-integration): Add sentry DSN route handler by default ([#14095](https://github.com/getsentry/sentry-javascript/pull/14095))
62+
1363
## 8.35.0
1464

1565
### Beta release of the official Nuxt Sentry SDK

dev-packages/e2e-tests/test-applications/nuxt-4/app/pages/pinia-cart.vue

Lines changed: 0 additions & 73 deletions
This file was deleted.

dev-packages/e2e-tests/test-applications/nuxt-4/nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default defineNuxtConfig({
44
compatibilityDate: '2024-04-03',
55
imports: { autoImport: false },
66

7-
modules: ['@pinia/nuxt', '@sentry/nuxt/module'],
7+
modules: ['@sentry/nuxt/module'],
88

99
runtimeConfig: {
1010
public: {

dev-packages/e2e-tests/test-applications/nuxt-4/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"test:assert": "pnpm test"
1515
},
1616
"dependencies": {
17-
"@pinia/nuxt": "^0.5.5",
1817
"@sentry/nuxt": "latest || *",
1918
"nuxt": "^3.13.2"
2019
},

dev-packages/e2e-tests/test-applications/nuxt-4/sentry.client.config.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,4 @@ Sentry.init({
77
tunnel: `http://localhost:3031/`, // proxy server
88
tracesSampleRate: 1.0,
99
trackComponents: true,
10-
trackPinia: {
11-
actionTransformer: action => `Transformed: ${action}`,
12-
stateTransformer: state => ({
13-
transformed: true,
14-
...state,
15-
}),
16-
},
1710
});

dev-packages/e2e-tests/test-applications/nuxt-4/stores/cart.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

dev-packages/e2e-tests/test-applications/nuxt-4/tests/pinia.test.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@
153153
"printWidth": 120,
154154
"proseWrap": "always",
155155
"singleQuote": true,
156-
"trailingComma": "all"
156+
"trailingComma": "all",
157+
"overrides": [{
158+
"files": "CHANGELOG.md",
159+
"options": {
160+
"proseWrap": "preserve"
161+
}
162+
}]
157163
}
158164
}

packages/nuxt/src/common/types.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
import type { init as initNode } from '@sentry/node';
22
import type { SentryRollupPluginOptions } from '@sentry/rollup-plugin';
33
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
4-
import type { createSentryPiniaPlugin, init as initVue } from '@sentry/vue';
4+
import type { init as initVue } from '@sentry/vue';
55

66
// Omitting 'app' as the Nuxt SDK will add the app instance in the client plugin (users do not have to provide this)
7-
export type SentryNuxtClientOptions = Omit<Parameters<typeof initVue>[0] & object, 'app'> & {
8-
/**
9-
* Control if an existing Pinia store should be monitored.
10-
* Set this to `true` to track with default options or provide your custom Pinia plugin options.
11-
*
12-
* This only works if "@pinia/nuxt" is added to the `modules` array.
13-
*
14-
* @default false
15-
*/
16-
trackPinia?: true | Parameters<typeof createSentryPiniaPlugin>[0];
17-
};
18-
7+
export type SentryNuxtClientOptions = Omit<Parameters<typeof initVue>[0] & object, 'app'>;
198
export type SentryNuxtServerOptions = Omit<Parameters<typeof initNode>[0] & object, 'app'>;
209

2110
type SourceMapsOptions = {

packages/nuxt/src/runtime/plugins/sentry.client.ts

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { getClient } from '@sentry/core';
2-
import { consoleSandbox } from '@sentry/utils';
3-
import { browserTracingIntegration, createSentryPiniaPlugin, vueIntegration } from '@sentry/vue';
2+
import { browserTracingIntegration, vueIntegration } from '@sentry/vue';
43
import { defineNuxtPlugin } from 'nuxt/app';
54
import { reportNuxtError } from '../utils';
65

@@ -35,36 +34,18 @@ export default defineNuxtPlugin({
3534
name: 'sentry-client-integrations',
3635
dependsOn: ['sentry-client-config'],
3736
async setup(nuxtApp) {
38-
const sentryClient = getClient();
39-
const clientOptions = sentryClient && sentryClient.getOptions();
40-
4137
// This evaluates to true unless __SENTRY_TRACING__ is text-replaced with "false", in which case everything inside
4238
// will get tree-shaken away
4339
if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {
40+
const sentryClient = getClient();
41+
4442
if (sentryClient && '$router' in nuxtApp) {
4543
sentryClient.addIntegration(
4644
browserTracingIntegration({ router: nuxtApp.$router as VueRouter, routeLabel: 'path' }),
4745
);
4846
}
4947
}
5048

51-
if (clientOptions && 'trackPinia' in clientOptions && clientOptions.trackPinia) {
52-
if ('$pinia' in nuxtApp) {
53-
(nuxtApp.$pinia as { use: (plugin: unknown) => void }).use(
54-
// `trackPinia` is an object with custom options or `true` (pass `undefined` to use default options)
55-
createSentryPiniaPlugin(clientOptions.trackPinia === true ? undefined : clientOptions.trackPinia),
56-
);
57-
} else {
58-
clientOptions.debug &&
59-
consoleSandbox(() => {
60-
// eslint-disable-next-line no-console
61-
console.warn(
62-
'[Sentry] You set `trackPinia`, but the Pinia module was not found. Make sure to add `"@pinia/nuxt"` to your modules array.',
63-
);
64-
});
65-
}
66-
}
67-
6849
nuxtApp.hook('app:created', vueApp => {
6950
const sentryClient = getClient();
7051

0 commit comments

Comments
 (0)