-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#6054) ## Summary of changes Allows users to configure _additional_ `ADO.NET` `DbCommand`s to be disabled so they won't have a Span created from them. ## Reason for change Since we can instrument _any_ `DbCommand` in `ADO.NET` this can lead to unwanted/duplicate Spans that customers have little control over. This allows for a comma-separated list of command type names that the .NET Tracer will not create a Span for if they encounter it. ## Implementation details Adds new Environment Variable `DD_TRACE_DISABLED_ADONET_COMMAND_TYPES` that accepts a comma-separated `string` of `ADO.NET` Command Type names that the Tracer will not create a Span for. For example (some pseudo-code here): Assuming we have a custom `DbCommand` `FooDbCommand` that we don't want Spans for -> ```csharp public class FooDbCommand : DbCommand { ... class contents here } ``` We'd need to set `DD_TRACE_DISABLED_ADONET_COMMAND_TYPES` to -> ``` DD_TRACE_DISABLED_ADONET_COMMAND_TYPES="FooDbCommand" ``` ## Test coverage - Extended current `DbScopeFactoryTests` to add new value. - Extended `FakeCommandTests` to include disabling of `FakeCommand` - Snapshotted those tests as well. ## Other details Merge the dd-go PR when this PR is merged: DataDog/dd-go#150493 Backport of #6042 <!-- Fixes #{issue} --> <!--⚠️ 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. --> --------- Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>
- Loading branch information
1 parent
0c0b82b
commit 213312b
Showing
11 changed files
with
4,330 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.