Description
See Azure/azure-functions-dotnet-worker#2733 for the context.
I'd like to be able to disable tracing on function host and trace everything on the worker to reduce number of spans I might not care about.
What I tried:
- removing
telemetryMode
fromhost.json
and then no traces are exported, but the parent span is still generated. - disabling ASP.NET Core activity auto-creation (Disable Diagnostics and Activity dotnet/aspnetcore#18955) - the same
my config looks like this:
{
"version": "2.0",
"logging": {
"LogLevel": {
"Microsoft.AspNetCore.Hosting.Diagnostics": "None"
},
"EventLog": {
"LogLevel": {
"Microsoft.AspNetCore.Hosting.Diagnostics": "None"
}
}
}
}
What I see
I get the following telemetry for it with https://github.com/lmolkova/testfuncotel/tree/aspnetcoreint
I.e. two activities - from worker ASP.NET Core and custom one in the function.
Both of these activities have a parent (but different parents) which came from host.
Also related to Azure/azure-functions-dotnet-worker#2875
What I expect
When I don't provide telemetryMode
, don't have APPLICATIONINSIGHTS_CONNECTION_STRING
and also explicitly disable ASP.NET Core activity creation in absence of a listener, the host should not create any activities.