Skip to content

How to disable ASP HttpRequestIn Activity listeners? #54551

Answered by ogxd
ogxd asked this question in Q&A
Discussion options

You must be logged in to vote

Ok I found out, I had to disable a logging source (weird to me that has an impact on tracing, but anyway..).
Here is the place in code where this activity is created despite having no listeners on that source:

if (loggingEnabled || diagnosticListenerActivityCreationEnabled)
{
activity = new Activity(ActivityName);

In appsettings.json:

"Logging": {
    "LogLevel": {
        "Microsoft.AspNetCore.Hosting.Diagnostics": "None"
    }
}

This was answered in this issue: #18955.
I didn't need the EventLog section in my case.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ogxd
Comment options

Answer selected by ogxd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants