Interface StatusData


@Immutable public interface StatusData
Defines the status of a Span by providing a standard StatusCode in conjunction with an optional descriptive message.
  • Method Summary

    Modifier and Type
    Method
    Description
    static StatusData
    create(io.opentelemetry.api.trace.StatusCode code, String description)
    Returns a StatusData with the given code and description.
    static StatusData
    Returns a StatusData indicating an error occurred.
    Returns the description of this Status for human consumption.
    io.opentelemetry.api.trace.StatusCode
    Returns the status code.
    static StatusData
    ok()
    Returns a StatusData indicating the operation has been validated by an application developer or operator to have completed successfully.
    static StatusData
    Returns the default StatusData.
  • Method Details

    • ok

      static StatusData ok()
      Returns a StatusData indicating the operation has been validated by an application developer or operator to have completed successfully.
    • unset

      static StatusData unset()
      Returns the default StatusData.
    • error

      static StatusData error()
      Returns a StatusData indicating an error occurred.
    • create

      static StatusData create(io.opentelemetry.api.trace.StatusCode code, @Nullable String description)
      Returns a StatusData with the given code and description. If description is null, the returned StatusData does not have a description.
    • getStatusCode

      io.opentelemetry.api.trace.StatusCode getStatusCode()
      Returns the status code.
    • getDescription

      String getDescription()
      Returns the description of this Status for human consumption.
      Returns:
      the description of this Status.