Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lmolkova opened this issue Nov 19, 2024 · 3 comments
Open

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

lmolkova opened this issue Nov 19, 2024 · 3 comments
Assignees
Labels
area: otel bot: do not close Prevents bot automation from closing issues Logging and Metrics

Comments

@lmolkova
Copy link
Member

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.

@bhagyshricompany
Copy link

Hi @lmolkova Thanks for reporting please share the all steps for repro.Thanks

@lmolkova
Copy link
Member Author

lmolkova commented Dec 3, 2024

/bot not-stale

@bhagyshricompany

this is a question or a feature request, rather than a bug. Repro app is available in the https://github.com/lmolkova/testfuncotel/tree/aspnetcoreint and the question is:

  • is there a way to disable tracing on the host completely?
  • If so - how? I tried something listed above and it didn't work.
  • if it's not possible then treat it as a feature request

@microsoft-github-policy-service microsoft-github-policy-service bot added bot: do not close Prevents bot automation from closing issues Needs: Attention 👋 labels Dec 3, 2024
Copy link
Contributor

Thank you lmolkova. This issue will not be automatically closed and a member of the team will review it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: otel bot: do not close Prevents bot automation from closing issues Logging and Metrics
Projects
None yet
Development

No branches or pull requests

4 participants