[Debugger] Log over-length identifier redaction at Warning instead of Error#8853
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8853) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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 highlighted 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). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8853) - mean (70ms) : 68, 72
master - mean (69ms) : 67, 71
section Bailout
This PR (8853) - mean (74ms) : 72, 76
master - mean (73ms) : 72, 75
section CallTarget+Inlining+NGEN
This PR (8853) - mean (1,082ms) : 1035, 1129
master - mean (1,080ms) : 1036, 1125
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8853) - mean (109ms) : 107, 112
master - mean (109ms) : 106, 111
section Bailout
This PR (8853) - mean (110ms) : 108, 112
master - mean (110ms) : 108, 112
section CallTarget+Inlining+NGEN
This PR (8853) - mean (783ms) : 764, 802
master - mean (777ms) : 755, 799
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8853) - mean (97ms) : 93, 100
master - mean (97ms) : 94, 99
section Bailout
This PR (8853) - mean (98ms) : 96, 100
master - mean (97ms) : 95, 99
section CallTarget+Inlining+NGEN
This PR (8853) - mean (935ms) : 894, 976
master - mean (937ms) : 899, 975
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8853) - mean (98ms) : 92, 104
master - mean (98ms) : 93, 104
section Bailout
This PR (8853) - mean (99ms) : 93, 104
master - mean (99ms) : 95, 103
section CallTarget+Inlining+NGEN
This PR (8853) - mean (816ms) : 770, 861
master - mean (812ms) : 770, 855
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8853) - mean (206ms) : 201, 212
master - mean (204ms) : 199, 209
section Bailout
This PR (8853) - mean (210ms) : 205, 214
master - mean (207ms) : 203, 212
section CallTarget+Inlining+NGEN
This PR (8853) - mean (1,219ms) : 1169, 1270
master - mean (1,211ms) : 1168, 1254
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8853) - mean (293ms) : 289, 297
master - mean (291ms) : 286, 296
section Bailout
This PR (8853) - mean (297ms) : 291, 302
master - mean (290ms) : 285, 296
section CallTarget+Inlining+NGEN
This PR (8853) - mean (987ms) : 963, 1010
master - mean (974ms) : 954, 993
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8853) - mean (291ms) : 284, 298
master - mean (286ms) : 281, 291
section Bailout
This PR (8853) - mean (289ms) : 283, 294
master - mean (285ms) : 278, 291
section CallTarget+Inlining+NGEN
This PR (8853) - mean (1,176ms) : 1134, 1219
master - mean (1,173ms) : 1130, 1216
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8853) - mean (288ms) : 282, 294
master - mean (285ms) : 280, 289
section Bailout
This PR (8853) - mean (286ms) : 281, 291
master - mean (287ms) : 280, 294
section CallTarget+Inlining+NGEN
This PR (8853) - mean (1,055ms) : 1004, 1107
master - mean (1,054ms) : 1007, 1102
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-06-30 14:08:20 Comparing candidate commit 10bf1a8 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 72 metrics, 0 unstable metrics, 61 known flaky benchmarks, 65 flaky benchmarks without significant changes.
|
| if (identifier.Length > MaxStackAlloc) | ||
| { | ||
| Log.Error("Identifier length {Length} exceeds maximum allowed length of {MaxSize}, hence we are going to redact this identifier", identifier.Length, property1: MaxStackAlloc); | ||
| Log.Warning("Identifier length {Length} exceeds maximum allowed length of {MaxSize}, hence we are going to redact this identifier", identifier.Length, property1: MaxStackAlloc); |
There was a problem hiding this comment.
Is the message even correct here? 🤔 Should it say "hence we are not going to redact this identifier"?
I could be wrong, but as far as I can see, if identifier.Length > MaxStackAlloc
TryNormalizereturnsfalseCheckForRedactedKeywordreturnsfalseIsRedactedKeywordreturnsfalseShouldRedactreturnsfalse
?
There was a problem hiding this comment.
Yes, the message is incorrect. I was thinking about changing it, probably it would be better to do it.
Summary of changes
Lower the severity of the "identifier length exceeds maximum allowed length" log in
Redaction.TryNormalizefromLog.ErrortoLog.Warning, and strip a stray UTF-8 BOM from the top ofRedaction.csto match the repo'scharset = utf-8convention.Reason for change
This message fires on the Dynamic Instrumentation snapshot-redaction path whenever a customer field/property name exceeds
MaxStackAlloc(512 chars). It is an expected, controlled situation driven by customer data — not a tracer bug — yet because it was logged atErrorit surfaced in Error Tracking as noise:Error Tracking issue
Implementation details
Log.Error(...)→Log.Warning(...)inRedaction.TryNormalize.Redaction.cs(the file was one of the few.csfiles still carrying one).Test coverage
Log-severity-only change; no behavioral change and no new tests required.
Other details
N/A