Skip to content
Open
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 @@ -17,6 +17,13 @@ test('sends a pageload transaction with a parameterized URL', async ({ page }) =
trace: {
op: 'pageload',
origin: 'auto.pageload.angular',
data: {
'sentry.origin': 'auto.pageload.angular',
'sentry.source': 'route',
'url.template': '/home/',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: We always want trailing slashes for this?

@Lms24 Lms24 Jul 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we generally don't want trailing slashes, but since url.template should ideally be 100% the same as the current span description (to avoid any filtering/grouping changes in the product) I'll take it for now. We're consistent because:

  • if we get a parameterized url, both url.template and span.description have a trailing slash
  • if we don't get a paramterized url, url.template isn't set, url.path has no trailing slash and neither does span.description.

Not great but I think it's fine. We could adjust our instrumentation in a major to no longer set trailing slashes for paramterized routes but I'd say it's logaf-l

'url.path': '/home',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/home$/),
},
},
},
transaction: '/home/',
Expand Down Expand Up @@ -46,6 +53,14 @@ test('sends a navigation transaction with a parameterized URL', async ({ page })
contexts: {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/123$/),
},
},
},
transaction: '/users/:id/',
Expand Down Expand Up @@ -78,6 +93,13 @@ test('sends a navigation transaction even if the pageload span is still active',
trace: {
op: 'pageload',
origin: 'auto.pageload.angular',
data: {
'sentry.origin': 'auto.pageload.angular',
'sentry.source': 'route',
'url.template': '/home/',
'url.path': '/home',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/home$/),
},
},
},
transaction: '/home/',
Expand All @@ -91,6 +113,13 @@ test('sends a navigation transaction even if the pageload span is still active',
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/123$/),
},
},
},
transaction: '/users/:id/',
Expand All @@ -115,6 +144,13 @@ test('groups redirects within one navigation root span', async ({ page }) => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/456',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/456$/),
},
},
},
transaction: '/users/:id/',
Expand Down Expand Up @@ -145,6 +181,13 @@ test.describe('finish routing span', () => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'url',
'url.path': '/cancel',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/cancel$/),
// url.template is not set because the navigation was cancelled before Angular fully resolved the route
},
Comment thread
cursor[bot] marked this conversation as resolved.
},
},
transaction: '/cancel',
Expand Down Expand Up @@ -176,6 +219,13 @@ test.describe('finish routing span', () => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'url',
'url.path': '/non-existent',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/non-existent$/),
// url.template is not set because the navigation failed before Angular fully resolved the route
},
},
},
transaction: nonExistentRoute,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ test('sends a pageload transaction with a parameterized URL', async ({ page }) =
trace: {
op: 'pageload',
origin: 'auto.pageload.angular',
data: {
'sentry.origin': 'auto.pageload.angular',
'sentry.source': 'route',
'url.template': '/home/',
'url.path': '/home',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/home$/),
},
},
},
transaction: '/home/',
Expand Down Expand Up @@ -46,6 +53,14 @@ test('sends a navigation transaction with a parameterized URL', async ({ page })
contexts: {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/123$/),
},
},
},
transaction: '/users/:id/',
Expand Down Expand Up @@ -78,6 +93,13 @@ test('sends a navigation transaction even if the pageload span is still active',
trace: {
op: 'pageload',
origin: 'auto.pageload.angular',
data: {
'sentry.origin': 'auto.pageload.angular',
'sentry.source': 'route',
'url.template': '/home/',
'url.path': '/home',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/home$/),
},
},
},
transaction: '/home/',
Expand All @@ -91,6 +113,13 @@ test('sends a navigation transaction even if the pageload span is still active',
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/123$/),
},
},
},
transaction: '/users/:id/',
Expand All @@ -115,6 +144,13 @@ test('groups redirects within one navigation root span', async ({ page }) => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/456',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/456$/),
},
},
},
transaction: '/users/:id/',
Expand Down Expand Up @@ -145,6 +181,13 @@ test.describe('finish routing span', () => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'url',
'url.path': '/cancel',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/cancel$/),
// url.template is not set because the navigation was cancelled before Angular fully resolved the route
},
},
},
transaction: '/cancel',
Expand Down Expand Up @@ -176,6 +219,13 @@ test.describe('finish routing span', () => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'url',
'url.path': '/non-existent',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/non-existent$/),
// url.template is not set because the navigation failed before Angular fully resolved the route
},
},
},
transaction: nonExistentRoute,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ test('sends a pageload transaction with a parameterized URL', async ({ page }) =
trace: {
op: 'pageload',
origin: 'auto.pageload.angular',
data: {
'sentry.origin': 'auto.pageload.angular',
'sentry.source': 'route',
'url.template': '/home/',
'url.path': '/home',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/home$/),
},
},
},
transaction: '/home/',
Expand Down Expand Up @@ -46,6 +53,14 @@ test('sends a navigation transaction with a parameterized URL', async ({ page })
contexts: {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/123$/),
},
},
},
transaction: '/users/:id/',
Expand Down Expand Up @@ -78,6 +93,13 @@ test('sends a navigation transaction even if the pageload span is still active',
trace: {
op: 'pageload',
origin: 'auto.pageload.angular',
data: {
'sentry.origin': 'auto.pageload.angular',
'sentry.source': 'route',
'url.template': '/home/',
'url.path': '/home',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/home$/),
},
},
},
transaction: '/home/',
Expand All @@ -91,6 +113,13 @@ test('sends a navigation transaction even if the pageload span is still active',
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/123$/),
},
},
},
transaction: '/users/:id/',
Expand All @@ -115,6 +144,13 @@ test('groups redirects within one navigation root span', async ({ page }) => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/456',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/456$/),
},
},
},
transaction: '/users/:id/',
Expand Down Expand Up @@ -145,6 +181,13 @@ test.describe('finish routing span', () => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'url',
'url.path': '/cancel',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/cancel$/),
// url.template is not set because the navigation was cancelled before Angular fully resolved the route
},
},
},
transaction: '/cancel',
Expand Down Expand Up @@ -176,6 +219,13 @@ test.describe('finish routing span', () => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'url',
'url.path': '/non-existent',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/non-existent$/),
// url.template is not set because the navigation failed before Angular fully resolved the route
},
},
},
transaction: nonExistentRoute,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ test('sends a pageload transaction with a parameterized URL', async ({ page }) =
trace: {
op: 'pageload',
origin: 'auto.pageload.angular',
data: {
'sentry.origin': 'auto.pageload.angular',
'sentry.source': 'route',
'url.template': '/home/',
'url.path': '/home',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/home$/),
},
},
},
transaction: '/home/',
Expand Down Expand Up @@ -46,6 +53,14 @@ test('sends a navigation transaction with a parameterized URL', async ({ page })
contexts: {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/123$/),
},
},
},
transaction: '/users/:id/',
Expand Down Expand Up @@ -78,6 +93,13 @@ test('sends a navigation transaction even if the pageload span is still active',
trace: {
op: 'pageload',
origin: 'auto.pageload.angular',
data: {
'sentry.origin': 'auto.pageload.angular',
'sentry.source': 'route',
'url.template': '/home/',
'url.path': '/home',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/home$/),
},
},
},
transaction: '/home/',
Expand All @@ -91,6 +113,13 @@ test('sends a navigation transaction even if the pageload span is still active',
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/123',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/123$/),
},
},
},
transaction: '/users/:id/',
Expand All @@ -115,6 +144,13 @@ test('groups redirects within one navigation root span', async ({ page }) => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'route',
'url.template': '/users/:id/',
'url.path': '/users/456',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/users\/456$/),
},
},
},
transaction: '/users/:id/',
Expand Down Expand Up @@ -145,6 +181,13 @@ test.describe('finish routing span', () => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'url',
'url.path': '/cancel',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/cancel$/),
// url.template is not set because the navigation was cancelled before Angular fully resolved the route
},
},
},
transaction: '/cancel',
Expand Down Expand Up @@ -176,6 +219,13 @@ test.describe('finish routing span', () => {
trace: {
op: 'navigation',
origin: 'auto.navigation.angular',
data: {
'sentry.origin': 'auto.navigation.angular',
'sentry.source': 'url',
'url.path': '/non-existent',
'url.full': expect.stringMatching(/^https?:\/\/localhost:\d+\/non-existent$/),
// url.template is not set because the navigation failed before Angular fully resolved the route
},
},
},
transaction: nonExistentRoute,
Expand Down
Loading
Loading