Skip to content

Disable Diagnostics and Activity #18955

Closed
@ladeak

Description

@ladeak

[Question]

In ASP.NET Core 2 HostingApplicationDiagnostics only created Activity.Current if we manually subscribed DiagnosticsListener for events Microsoft.AspNetCore.Hosting.HttpRequestIn.

In ASP.NET Core 3.1 it seems the Activity.Current is always created. That means if I have a Request-Id in the header, it is being used by the Activity by default. Is there a way to opt-out this behavior (other than turning off logging)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-hostingIncludes Hostingarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions