diff --git a/tracer/src/Datadog.Trace/Iast/Location.cs b/tracer/src/Datadog.Trace/Iast/Location.cs index 3b13efd845b8..8d9005a295b1 100644 --- a/tracer/src/Datadog.Trace/Iast/Location.cs +++ b/tracer/src/Datadog.Trace/Iast/Location.cs @@ -79,7 +79,7 @@ internal void ReportStack(Span? span) if (span is not null && StackId is not null && _stack is not null && _stack.FrameCount > 0) { #pragma warning disable CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types. Some TFMs (pre net 6) don't have null annotations - var stack = StackReporter.GetStack(Security.Instance.Settings.MaxStackTraceDepth, StackId, _stack.GetFrames()); + var stack = StackReporter.GetStack(Security.Instance.Settings.MaxStackTraceDepth, Security.Instance.Settings.MaxStackTraceDepthTopPercent, StackId, _stack.GetFrames()); #pragma warning restore CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types. if (stack is not null) {