-
Notifications
You must be signed in to change notification settings - Fork 145
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
Comments
Hi @samcarton, at this moment the only way to disable this is to set Thanks for raising this though as we will look into improving this as this isn't ideal. |
Update: it looks like #5795 (work in progress) will help resolve this issue |
bouwkast
added a commit
that referenced
this issue
Feb 21, 2025
## Summary of changes This adds the ability for `ActivitySource`s to be disabled so that they won't be listened to by the .NET Tracer. ## Reason for change Currently there is no way to disable an `ActivitySource` if OpenTelemetry is enabled in the .NET Tracer without entirely disabling OpenTelemetry support. The `IgnoreActivityHandler` is insufficient as it will still _listen_ to the `ActivitySource` so they will create `Activity` objects. ## Implementation details - Adds `DD_TRACE_DISABLED_ACTIVITY_SOURCES` that accepts a comma-separated list of `ActivitySource` names that supports the glob-pattern. - example: `"DD_TRACE_DISABLED_ACTIVITY_SOURCES": "SomeSourceName,*SomeGlobPattern*"` - Adds `DisableActivityHandler` that will determine based on the above environment variable whether or not a given `ActivitySource` should be listened to. ## Test coverage - Updated the `NetActivitySdk` sample project with an ignored `ActivitySource` and some that are disabled. ## Other details <!-- Fixes #{issue} --> When merged, get this merged: DataDog/dd-go#171612 Fixes #5740 <!--⚠️ Note: where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Npgsql
- in this instance there is an issue withNpgsql
where multiplexing and open telemetry tracing are causing runaway CPU and memory issues.DD_TRACE_Npgsql_ENABLED=false
does cause datadog to ignore traces produced byNpgsql
Npgsql
ActivitySource
in theIgnoreActivityHandler
,Npgsql
is still producing the traces, and still causing runaway CPU and memory issues.Npgsql
side, but in the meantime we appear to have no way to turn off the problematic tracing.Ignored
integration to disable tracing for that integration entirely, whatever your reason for doing so may be.To Reproduce
Steps to reproduce the behavior:
DD_TRACE_Npgsql_ENABLED=false
Expected behavior
Runtime environment (please complete the following information):
<PackageReference Include="Datadog.Trace" Version="2.45.0" />
The text was updated successfully, but these errors were encountered: