Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dashboard/Analysis/SqlServerDrillDownCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
try
{
finding.DrillDown = new Dictionary<string, object>();
var pathKeys = finding.StoryPath.Split(" -> ", StringSplitOptions.RemoveEmptyEntries).ToHashSet();
var pathKeys = finding.StoryPath.Split(" ", StringSplitOptions.RemoveEmptyEntries).ToHashSet();

if (pathKeys.Contains("DEADLOCKS"))
await CollectTopDeadlocks(finding, context);
Expand Down Expand Up @@ -77,7 +77,7 @@
if (pathKeys.Contains("MEMORY_GRANT_PENDING"))
await CollectPendingGrants(finding, context);

if (pathKeys.Any(k => k.StartsWith("BAD_ACTOR_")))

Check warning on line 80 in Dashboard/Analysis/SqlServerDrillDownCollector.cs

View workflow job for this annotation

GitHub Actions / build

The behavior of 'string.StartsWith(string)' could vary based on the current user's locale settings. Replace this call in 'PerformanceMonitorDashboard.Analysis.SqlServerDrillDownCollector.EnrichFindingsAsync(System.Collections.Generic.List<PerformanceMonitorDashboard.Analysis.AnalysisFinding>, PerformanceMonitorDashboard.Analysis.AnalysisContext)' with a call to 'string.StartsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)

Check warning on line 80 in Dashboard/Analysis/SqlServerDrillDownCollector.cs

View workflow job for this annotation

GitHub Actions / build

The behavior of 'string.StartsWith(string)' could vary based on the current user's locale settings. Replace this call in 'PerformanceMonitorDashboard.Analysis.SqlServerDrillDownCollector.EnrichFindingsAsync(System.Collections.Generic.List<PerformanceMonitorDashboard.Analysis.AnalysisFinding>, PerformanceMonitorDashboard.Analysis.AnalysisContext)' with a call to 'string.StartsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)
await CollectBadActorDetail(finding, context);

// Plan analysis: for findings with top queries, analyze their cached plans
Expand All @@ -90,7 +90,7 @@
catch (Exception ex)
{
Logger.Error(
$"[SqlServerDrillDownCollector] Drill-down failed for {finding.StoryPath}: {ex.GetType().Name}: {ex.Message}");
$"[SqlServerDrillDownCollector] Drill-down failed for {finding.StoryPath}: {ex.GetType().Name}: {ex.Message}\n{ex.StackTrace}");
// Don't null out -- keep whatever was collected before the error
}
}
Expand Down Expand Up @@ -618,7 +618,7 @@

// Only analyze plans for bad actor findings (1 plan each).
// Skip top_cpu_queries (5 plans would be too heavy).
if (!finding.RootFactKey.StartsWith("BAD_ACTOR_")) return;

Check warning on line 621 in Dashboard/Analysis/SqlServerDrillDownCollector.cs

View workflow job for this annotation

GitHub Actions / build

The behavior of 'string.StartsWith(string)' could vary based on the current user's locale settings. Replace this call in 'PerformanceMonitorDashboard.Analysis.SqlServerDrillDownCollector.CollectPlanAnalysis(PerformanceMonitorDashboard.Analysis.AnalysisFinding, PerformanceMonitorDashboard.Analysis.AnalysisContext)' with a call to 'string.StartsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)

var queryHash = finding.RootFactKey.Replace("BAD_ACTOR_", "");
if (string.IsNullOrEmpty(queryHash)) return;
Expand Down
Loading