Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/test-ssr',
'url.path': '/test-ssr',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/test-ssr$/),
}),
op: 'pageload',
origin: 'auto.pageload.astro',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ test.describe('tracing in static/pre-rendered routes', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/test-static',
'url.path': '/test-static',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/test-static$/),
}),
op: 'pageload',
origin: 'auto.pageload.astro',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/test-ssr',
'url.path': '/test-ssr',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/test-ssr$/),
}),
op: 'pageload',
origin: 'auto.pageload.astro',
Expand Down Expand Up @@ -213,6 +216,9 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/user-page/[userId]',
'url.path': '/user-page/myUsername123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/user-page\/myUsername123$/),
},
},
},
Expand Down Expand Up @@ -309,6 +315,9 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/catchAll/[...path]',
'url.path': '/catchAll/hell0/whatever-do',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/catchAll\/hell0\/whatever-do$/),
},
},
},
Expand Down Expand Up @@ -366,6 +375,9 @@ test.describe('parametrized vs static paths', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/user-page/settings',
'url.path': '/user-page/settings',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/user-page\/settings$/),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ test.describe('tracing in static routes with server islands', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/server-island',
'url.path': '/server-island',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/server-island$/),
}),
op: 'pageload',
origin: 'auto.pageload.astro',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ test.describe('tracing in static/pre-rendered routes', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/test-static',
'url.path': '/test-static',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/test-static$/),
}),
op: 'pageload',
origin: 'auto.pageload.astro',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/test-ssr',
'url.path': '/test-ssr',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/test-ssr$/),
}),
op: 'pageload',
origin: 'auto.pageload.astro',
Expand Down Expand Up @@ -213,6 +216,9 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/user-page/[userId]',
'url.path': '/user-page/myUsername123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/user-page\/myUsername123$/),
},
},
},
Expand Down Expand Up @@ -309,6 +315,9 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/catchAll/[...path]',
'url.path': '/catchAll/hell0/whatever-do',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/catchAll\/hell0\/whatever-do$/),
},
},
},
Expand Down Expand Up @@ -366,6 +375,9 @@ test.describe('parametrized vs static paths', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/user-page/settings',
'url.path': '/user-page/settings',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/user-page\/settings$/),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ test.describe('tracing in static routes with server islands', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/server-island',
'url.path': '/server-island',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/server-island$/),
}),
op: 'pageload',
origin: 'auto.pageload.astro',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ test.describe('tracing in static/pre-rendered routes', () => {
'sentry.op': 'pageload',
'sentry.origin': 'auto.pageload.astro',
'sentry.source': 'route',
'url.template': '/test-static',
'url.path': '/test-static',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/test-static$/),
}),
op: 'pageload',
origin: 'auto.pageload.astro',
Expand Down
1 change: 1 addition & 0 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"dependencies": {
"@sentry/browser": "10.64.0",
"@sentry/core": "10.64.0",
"@sentry/conventions": "^0.15.1",
"@sentry/node": "10.64.0",
"@sentry/vite-plugin": "^5.3.0"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/astro/src/client/browserTracingIntegration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
} from '@sentry/core';
import { DEBUG_BUILD } from '../debug-build';
import { URL_TEMPLATE } from '@sentry/conventions/attributes';

/**
* Returns the value of a meta-tag
Expand Down Expand Up @@ -48,6 +49,7 @@ export function browserTracingIntegration(
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.astro',
...(source === 'route' && { [URL_TEMPLATE]: name }),
},
});
}
Expand Down
Loading