From a4ef6e381f876d7718c2bec3c94a135a326cb9fd Mon Sep 17 00:00:00 2001 From: Sergey Tepliakov Date: Tue, 22 Mar 2022 18:42:52 +0000 Subject: [PATCH] Merged PR 652285: Make stats tracing a bit more explicit Make stats tracing a bit more explicit --- Public/Src/Cache/ContentStore/Library/Tracing/Tracer.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Public/Src/Cache/ContentStore/Library/Tracing/Tracer.cs b/Public/Src/Cache/ContentStore/Library/Tracing/Tracer.cs index 8001feab0..1a4dcfe28 100644 --- a/Public/Src/Cache/ContentStore/Library/Tracing/Tracer.cs +++ b/Public/Src/Cache/ContentStore/Library/Tracing/Tracer.cs @@ -316,12 +316,14 @@ namespace BuildXL.Cache.ContentStore.Tracing { if (string.IsNullOrEmpty(prefix)) { - // Trace(Severity.Debug, context, message); - counterSet.LogOrderedNameValuePairs(s => Trace(Severity.Debug, context, s, operation: nameof(TraceStatisticsAtShutdown))); + // Always prepend the messages with 'Shutdown stats' to simplify filtering. + // It's possible to filter based on the operation name, but seeing a prefix like this one in every message + // makes the filtering and analysis easier. + counterSet.LogOrderedNameValuePairs(s => Trace(Severity.Debug, context, $"Shutdown stats: {s}", operation: nameof(TraceStatisticsAtShutdown))); } else { - counterSet.LogOrderedNameValuePairs(s => Trace(Severity.Debug, context, $"{prefix}.{s}", operation: nameof(TraceStatisticsAtShutdown))); + counterSet.LogOrderedNameValuePairs(s => Trace(Severity.Debug, context, $"Shutdown stats: {prefix}.{s}", operation: nameof(TraceStatisticsAtShutdown))); } } }