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

Unable to completely disable Npgsql tracing #5740

Open
samcarton opened this issue Jun 26, 2024 · 2 comments · May be fixed by #5795
Open

Unable to completely disable Npgsql tracing #5740

samcarton opened this issue Jun 26, 2024 · 2 comments · May be fixed by #5795

Comments

@samcarton
Copy link

Describe the bug

  • We have a scenario where we want to disable tracing completely for Npgsql - in this instance there is an issue with Npgsql where multiplexing and open telemetry tracing are causing runaway CPU and memory issues.
  • Simply setting DD_TRACE_Npgsql_ENABLED=false does cause datadog to ignore traces produced by Npgsql
  • However, because the datadog Tracer still listens to the Npgsql ActivitySource in the IgnoreActivityHandler, Npgsql is still producing the traces, and still causing runaway CPU and memory issues.
  • Is there any way to completely disconnect certain integrations?
  • This is hopefully a temporary issue on the Npgsql side, but in the meantime we appear to have no way to turn off the problematic tracing.
  • This is also a broader issue, in that the tracing overhead is still incurred even when you would expect an Ignored integration to disable tracing for that integration entirely, whatever your reason for doing so may be.

To Reproduce
Steps to reproduce the behavior:

  1. Disable tracing for an integration, eg DD_TRACE_Npgsql_ENABLED=false
  2. Notice traces are still being created by the code

Expected behavior

  • Ignored integrations shouldn't be tracing at all.
  • OR there should be a way to completely disable tracing for an integration, instead of the enabled-but-ignored scenario we have now.

Runtime environment (please complete the following information):

  • Instrumentation mode: Nuget
  • Tracer version: <PackageReference Include="Datadog.Trace" Version="2.45.0" />
  • CLR: .net core 8.0.5
@bouwkast
Copy link
Contributor

Hi @samcarton, at this moment the only way to disable this is to set DD_TRACE_OTEL_ENABLED to false (if it is enabled), unfortunately this would disable the OpenTelemetry support within the .NET Tracer as well.

Thanks for raising this though as we will look into improving this as this isn't ideal.

@lucaspimentel
Copy link
Member

lucaspimentel commented Aug 21, 2024

Update: it looks like #5795 (work in progress) will help resolve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants