Skip to content

Wrong transaction name for angular route event #7681

Closed
@de-don

Description

@de-don

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/angular

SDK Version

7.46.0

Framework Version

Angular 15.1.5

Link to Sentry event

No response

SDK Setup

// Integrations

        new BrowserTracing({
          tracePropagationTargets: config.browserTracing.targets,
          routingInstrumentation: Sentry.routingInstrumentation,
        }),

// Providers

        {
          provide: Sentry.TraceService,
          deps: [Router],
        },
        {
          provide: APP_INITIALIZER,
          useFactory: () => () => void 0,
          deps: [Sentry.TraceService],
          multi: true,
        },

Steps to Reproduce

  1. Configure application with nested routes with parameters
  2. Configure BrowserTracing
  3. Check sentry logs

In my app I have urls like:

/:lang/user/:id/details
/en/user/123/details

Expected Result

When user visit /en/user/123/details, transaction name should be /en/user/123/details

Actual Result

When user visit /en/user/123/details, transaction name is /:lang

The ptoblem that my app has routes with empty path, so in function getParameterizedRouteFromSnapshot this routes stops the recursion.

Metadata

Metadata

Assignees

Labels

Package: angularIssues related to the Sentry Angular SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions