Skip to content

Sentry.getCurrentScope().setTransactionName(name) not having any effect #14663

Closed
@drmrbrewer

Description

@drmrbrewer

Self-Hosted Version

24.9.0

CPU Architecture

arm64

Docker Version

27.3.1, build ce12230

Docker Compose Version

2.29.7

Steps to Reproduce

I have an node.js express route that has two main branches within it, and the chosen branch to go down is based on what is passed into the incoming request. The two branches are quite different and would benefit from being regarded within Sentry as two different transactions.

I have tried calling the following soon after the code branches, to override the transaction name:

Sentry.getCurrentScope().setTransactionName('branchA');

and

Sentry.getCurrentScope().setTransactionName('branchB');

But... I'm not seeing these two transaction names anywhere in my data... in Performance for example I'm just seeing the GET /myRoute transaction but not separate branchA and branchB transactions.

What am I doing wrong? So far as I can tell I'm just doing what the docs are telling me to do.

Expected Result

See above.

Actual Result

See above.

Event ID

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions