+ {{ $route.params.param }} - {{ $route.params.param }}
+
+
diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3/tests/errors.client.test.ts
index cd0ae9051f71..fb03a08b4033 100644
--- a/dev-packages/e2e-tests/test-applications/nuxt-3/tests/errors.client.test.ts
+++ b/dev-packages/e2e-tests/test-applications/nuxt-3/tests/errors.client.test.ts
@@ -12,6 +12,7 @@ test.describe('client-side errors', async () => {
const error = await errorPromise;
+ expect(error.transaction).toEqual('/client-error');
expect(error).toMatchObject({
exception: {
values: [
@@ -25,6 +26,33 @@ test.describe('client-side errors', async () => {
],
},
});
- expect(error.transaction).toEqual('/client-error');
+ });
+
+ test('shows parametrized route on button error', async ({ page }) => {
+ const errorPromise = waitForError('nuxt-3', async errorEvent => {
+ return errorEvent?.exception?.values?.[0]?.value === 'Error thrown from Param Route Button';
+ });
+
+ await page.goto(`/test-param/1234`);
+ await page.locator('#errorBtn').click();
+
+ const error = await errorPromise;
+
+ expect(error.sdk.name).toEqual('sentry.javascript.nuxt');
+ expect(error.transaction).toEqual('/test-param/:param()');
+ expect(error.request.url).toMatch(/\/test-param\/1234/);
+ expect(error).toMatchObject({
+ exception: {
+ values: [
+ {
+ type: 'Error',
+ value: 'Error thrown from Param Route Button',
+ mechanism: {
+ handled: false,
+ },
+ },
+ ],
+ },
+ });
});
});
diff --git a/packages/nuxt/src/client/sdk.ts b/packages/nuxt/src/client/sdk.ts
index 254498acbcbc..3376e5fdbeb7 100644
--- a/packages/nuxt/src/client/sdk.ts
+++ b/packages/nuxt/src/client/sdk.ts
@@ -1,8 +1,4 @@
-import {
- browserTracingIntegration,
- getDefaultIntegrations as getBrowserDefaultIntegrations,
- init as initBrowser,
-} from '@sentry/browser';
+import { getDefaultIntegrations as getBrowserDefaultIntegrations, init as initBrowser } from '@sentry/browser';
import { applySdkMetadata } from '@sentry/core';
import type { Client } from '@sentry/types';
import type { SentryNuxtOptions } from '../common/types';
@@ -14,7 +10,8 @@ import type { SentryNuxtOptions } from '../common/types';
*/
export function init(options: SentryNuxtOptions): Client | undefined {
const sentryOptions = {
- defaultIntegrations: [...getBrowserDefaultIntegrations(options), browserTracingIntegration()],
+ /* BrowserTracing is added later with the Nuxt client plugin */
+ defaultIntegrations: [...getBrowserDefaultIntegrations(options)],
...options,
};
diff --git a/packages/nuxt/src/common/types.ts b/packages/nuxt/src/common/types.ts
index 0187e83170a7..2a42046b784a 100644
--- a/packages/nuxt/src/common/types.ts
+++ b/packages/nuxt/src/common/types.ts
@@ -5,93 +5,93 @@ export type SentryNuxtOptions = Omit