-
Notifications
You must be signed in to change notification settings - Fork 147
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
[IAST] Added IAST instrumentation category to ado net Reader integrations #6523
[IAST] Added IAST instrumentation category to ado net Reader integrations #6523
Conversation
@@ -288,7 +294,8 @@ internal class CommandExecuteScalarWithBehaviorAttribute : Attribute | |||
[AdoNetTargetSignature( | |||
MethodName = AdoNetConstants.MethodNames.Read, | |||
ReturnTypeName = ClrNames.Bool, | |||
CallTargetType = typeof(ReaderReadIntegration))] | |||
CallTargetType = typeof(ReaderReadIntegration), | |||
InstrumentationCategory = InstrumentationCategory.Iast)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know these are only used for Iast
currently, but I think defaulting to Iast here is confusing when everything else is for Tracing
by default.
I think we should rename these attributes to make it clear, e.g.
ReaderReadAttribute
-> ReaderReadIastAttribute
or IastReaderReadAttribute
As we'll need to create new attributes if we want to target tracing etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see your point.
tracer/test/Datadog.Trace.SourceGenerators.Tests/Datadog.Trace.SourceGenerators.Tests.csproj
Outdated
Show resolved
Hide resolved
tracer/test/Datadog.Trace.SourceGenerators.Tests/NukeStepGeneratorTests.cs
Outdated
Show resolved
Hide resolved
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6523) - mean (69ms) : 65, 73
. : milestone, 69,
master - mean (69ms) : 65, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6523) - mean (979ms) : 961, 998
. : milestone, 979,
master - mean (978ms) : 956, 999
. : milestone, 978,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6523) - mean (108ms) : 105, 111
. : milestone, 108,
master - mean (108ms) : 105, 110
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (6523) - mean (680ms) : 660, 700
. : milestone, 680,
master - mean (675ms) : 660, 691
. : milestone, 675,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6523) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 89, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6523) - mean (630ms) : 614, 646
. : milestone, 630,
master - mean (636ms) : 619, 653
. : milestone, 636,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6523) - mean (195ms) : 191, 200
. : milestone, 195,
master - mean (194ms) : 189, 199
. : milestone, 194,
section CallTarget+Inlining+NGEN
This PR (6523) - mean (1,106ms) : 1082, 1130
. : milestone, 1106,
master - mean (1,101ms) : 1073, 1130
. : milestone, 1101,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6523) - mean (281ms) : 277, 285
. : milestone, 281,
master - mean (279ms) : 274, 283
. : milestone, 279,
section CallTarget+Inlining+NGEN
This PR (6523) - mean (873ms) : 848, 898
. : milestone, 873,
master - mean (875ms) : 846, 904
. : milestone, 875,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6523) - mean (269ms) : 265, 273
. : milestone, 269,
master - mean (267ms) : 262, 272
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (6523) - mean (850ms) : 823, 876
. : milestone, 850,
master - mean (854ms) : 820, 889
. : milestone, 854,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
Datadog ReportBranch report: ✅ 0 Failed, 602005 Passed, 4983 Skipped, 48h 1m 38.15s Total Time |
Summary of changes
Added Instrumentation category to AdoNetSignature attribute and set it to IAST for all ado net Reader integrations
Reason for change
IAST integrations were being active in non IAST scenarios
Implementation details
Default category was Tracer. Added the InstrumentationCategory field to the attribute and generate the call targets properly
Test coverage
None, to avoid build clutter (as discussed in the comments)
Other details