private static void LogMetricsFromAuthResult(AuthenticationResult authenticationResult, ICoreLogger logger) { var sb = new StringBuilder(250); sb.AppendLine(); sb.Append("[LogMetricsFromAuthResult] Cache Refresh Reason: "); sb.AppendLine(authenticationResult.AuthenticationResultMetadata.CacheRefreshReason.ToString()); sb.Append("[LogMetricsFromAuthResult] DurationInCacheInMs: "); sb.AppendLine(authenticationResult.AuthenticationResultMetadata.DurationInCacheInMs.ToString()); sb.Append("[LogMetricsFromAuthResult] DurationTotalInMs: "); sb.AppendLine(authenticationResult.AuthenticationResultMetadata.DurationTotalInMs.ToString()); sb.Append("[LogMetricsFromAuthResult] DurationInHttpInMs: "); sb.AppendLine(authenticationResult.AuthenticationResultMetadata.DurationInHttpInMs.ToString()); logger.Always(sb.ToString()); logger.AlwaysPii($"[LogMetricsFromAuthResult] TokenEndpoint: {authenticationResult.AuthenticationResultMetadata.TokenEndpoint ?? ""}", "TokenEndpoint: ****"); }