diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.ExceptionSummarization/ExceptionSummary.cs b/src/Libraries/Microsoft.Extensions.Diagnostics.ExceptionSummarization/ExceptionSummary.cs index fc3178248c6..f47a6a2c9d2 100644 --- a/src/Libraries/Microsoft.Extensions.Diagnostics.ExceptionSummarization/ExceptionSummary.cs +++ b/src/Libraries/Microsoft.Extensions.Diagnostics.ExceptionSummarization/ExceptionSummary.cs @@ -13,7 +13,10 @@ namespace Microsoft.Extensions.Diagnostics.ExceptionSummarization; /// Metric tags typically support a limited number of distinct values, and as such they are not suitable /// to represent values which are highly variable, such as the result of . /// An exception summary represents a low-cardinality version of an exception's information, suitable for such -/// cases. The summary never includes sensitive information. +/// cases. +/// +/// The property never include sensitive information. +/// But the property might contain sensitive information and should thus not be used in telemetry. /// public readonly struct ExceptionSummary : IEquatable { @@ -42,14 +45,18 @@ public ExceptionSummary(string exceptionType, string description, string additio /// /// Gets the summary description of the exception. /// + /// + /// This is a low cardinality string suitable for use as a metric dimension, and it is guaranteed not to + /// contain privacy-sensitive information. + /// public string Description { get; } /// /// Gets the additional details of the exception. /// /// - /// This string can have a relatively high cardinality and is therefore not suitable as a metric dimension. It - /// is primarily intended for use in low-level diagnostics. + /// This string can have a relatively high cardinality and may contain privacy-sensitive information and is therefore not suitable + /// as a metric dimension. It is primarily intended for use in low-level diagnostics. /// public string AdditionalDetails { get; } @@ -66,6 +73,9 @@ public override int GetHashCode() => HashCode.Combine( /// Gets a string representation of this object. /// /// A string representing this object. + /// + /// The string returned by this call is not suitable to be used in telemetry as it may contain privacy-sensitive information. + /// public override string ToString() { return AdditionalDetails.Length == 0 diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.ExceptionSummarization/IExceptionSummaryProvider.cs b/src/Libraries/Microsoft.Extensions.Diagnostics.ExceptionSummarization/IExceptionSummaryProvider.cs index 7f75f7ac7d9..24cfd0d079e 100644 --- a/src/Libraries/Microsoft.Extensions.Diagnostics.ExceptionSummarization/IExceptionSummaryProvider.cs +++ b/src/Libraries/Microsoft.Extensions.Diagnostics.ExceptionSummarization/IExceptionSummaryProvider.cs @@ -20,7 +20,7 @@ public interface IExceptionSummaryProvider /// Provides the index of the description for the exception along with optional additional data. /// /// The exception. - /// The additional details of the given exception, if any. + /// The additional details of the given exception, if any. Ideally, this string should not contain any privacy-sensitive information. /// The index of the description. /// /// This method should only get invoked with an exception which is type compatible with a type