Packages

package tracing

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. sealed abstract class StatusMapper[-E, -A] extends AnyRef

    Maps the result of a wrapped ZIO effect to the status of the io.opentelemetry.api.trace.Span.

    Maps the result of a wrapped ZIO effect to the status of the io.opentelemetry.api.trace.Span.

    For more details, see: Set status

    Usage examples:

    StatusMapper.failure[MyError](_ => StatusCode.ERROR)(e => Some(new RuntimeException(e.message)))
    StatusMapper.failureNoException(_ => StatusCode.ERROR)
    StatusMapper.failureThrowable(StatusCode.ERROR)
    
    StatusMapper.success[Response] {
      resp => if(resp.code == 500) StatusCode.ERROR else StatusCode.OK
    } { resp =>
      if(resp.code == 500) Some(resp.errorMessage) else None
    }
    StatusMapper.successNoDescription[Response](_ => StatusCode.OK)
    
    StatusMapper.both(
      StatusMapper.failureThrowable(StatusCode.ERROR),
      StatusMapper.successNoDescription[Any](_ => StatusCode.OK)
    )
  2. trait Tracing extends AnyRef

Value Members

  1. object StatusMapper
  2. object Tracing

Ungrouped