Skip to content

It should be possible to completely disable tracing on the host #10641

Open
@lmolkova

Description

@lmolkova

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:

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

Image

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.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions