Class ProtoFailureDiagnostics
The sanitized facts shared by every failed call in every protocol, so REST, GraphQL, gRPC and messaging redact and report a failure the same way: the address and the message pass the shared redaction rules, and cancellation is recognized from either the token or the exception type.
public sealed record ProtoFailureDiagnostics : IEquatable<ProtoFailureDiagnostics>
- Inheritance
-
ProtoFailureDiagnostics
- Implements
- Inherited Members
- Extension Methods
Constructors
ProtoFailureDiagnostics(string?, string, string, bool)
The sanitized facts shared by every failed call in every protocol, so REST, GraphQL, gRPC and messaging redact and report a failure the same way: the address and the message pass the shared redaction rules, and cancellation is recognized from either the token or the exception type.
public ProtoFailureDiagnostics(string? RequestUri, string ExceptionType, string Message, bool IsCanceled)
Parameters
Properties
Duration
How long the failed call ran, when the protocol measured it.
public TimeSpan? Duration { get; init; }
Property Value
ExceptionType
public string ExceptionType { get; init; }
Property Value
IsCanceled
public bool IsCanceled { get; init; }
Property Value
Message
public string Message { get; init; }
Property Value
RequestUri
public string? RequestUri { get; init; }
Property Value
Methods
From(Uri?, Exception, CancellationToken, JsonDiagnosticOptions?, IReadOnlyCollection<string>?)
Captures a failed call. options supplies the redaction rules;
sensitiveQueryParameters overrides the address redaction list, so an HTTP
protocol keeps its configured SensitiveQueryParameters while gRPC and messaging use the
shared defaults.
public static ProtoFailureDiagnostics From(Uri? requestUri, Exception exception, CancellationToken cancellationToken, JsonDiagnosticOptions? options = null, IReadOnlyCollection<string>? sensitiveQueryParameters = null)
Parameters
requestUriUriexceptionExceptioncancellationTokenCancellationTokenoptionsJsonDiagnosticOptionssensitiveQueryParametersIReadOnlyCollection<string>