Struct Status
- Namespace
- OpenTelemetry.Trace
- Assembly
- OpenTelemetry.Api.dll
Span execution status.
public readonly struct Status : IEquatable<Status>
- Implements
- Inherited Members
Fields
Error
The operation contains an error.
public static readonly Status Error
Field Value
Ok
The operation completed successfully.
public static readonly Status Ok
Field Value
Unset
The default status.
public static readonly Status Unset
Field Value
Properties
Description
Gets the status description.
public string Description { get; }
Property Value
StatusCode
Gets the canonical code from this status.
public StatusCode StatusCode { get; }
Property Value
Methods
Equals(Status)
public bool Equals(Status other)
Parameters
other
Status
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
WithDescription(string)
Returns a new instance of a status with the description populated.
public Status WithDescription(string description)
Parameters
description
stringDescription of the status.
Returns
- Status
New instance of the status class with the description populated.
Remarks
Note: Status Description is only valid for Error Status and will be ignored for all other StatusCode values. See the Status API for details.
Operators
operator ==(Status, Status)
Compare two Status for equality.
public static bool operator ==(Status status1, Status status2)
Parameters
Returns
operator !=(Status, Status)
Compare two Status for not equality.
public static bool operator !=(Status status1, Status status2)