Skip to content

Activity.SetTag not processed as expected #4043

Closed
@nefarius

Description

@nefarius

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

In my ASP.NET Core (.NET 8) endpoint handler I used

Activity.Current?.SetTag("myApp.userId", request.UserId);

which worked finde before moving to Sentry. I added OTEL integration as per documentation. The tags do not show up in the Sentry Dashboard.

I change it to

SentrySdk.ConfigureScope(scope =>
{
    scope.SetTag("myApp.userId", request.UserId);
});

and it works as expected.

Expected Result

Ideally Activity.Current?.SetTag would be routed to Sentry as expected or adjust the documentation on why this isn't possible/working.

Actual Result

If I open a sample trace in Trace View or search for the tag value, I can not find it if using Activity.SetTag. I repeat the test with SentrySdk.ConfigureScope... and it works.

Product Area

Traces

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions