-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to disable additional
ADO.NET
Command Types (#6042)
## Summary of changes Allows users to configure _additionally_ `ADO.NET` `DbCommand`s to be disabled so they won't have a Span created from them. ## Reason for change Since we instrument basically _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 Backported to 2.x in #6054 <!-- 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 <[email protected]>
- Loading branch information
1 parent
b756cd9
commit 801f63a
Showing
11 changed files
with
4,512 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.