SpanRef

org.typelevel.otel4s.sdk.trace.SpanRef
trait SpanRef[F[_]] extends Backend[F]

An extended Span interface that provides access to internal state.

Since the span's internal state can be mutated during the lifetime, some operations are effectful.

Type parameters

F

the higher-kinded type of a polymorphic effect

Attributes

Source
SpanRef.scala
Graph
Supertypes
trait Backend[F]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Returns the duration of the span.

Returns the duration of the span.

If still active then returns Clock[F].realTime - start time.

Attributes

Source
SpanRef.scala
def getAttribute[A](key: AttributeKey[A]): F[Option[A]]

Returns the attribute value for the given key.

Returns the attribute value for the given key. Returns None if the key is absent in the storage.

Attributes

Note

the attribute values can be changed during the lifetime of the span by using Span.addAttribute, so this value cannot be cached.

Source
SpanRef.scala
def hasEnded: F[Boolean]

Indicates whether the span has already been ended.

Indicates whether the span has already been ended.

Attributes

Source
SpanRef.scala
def kind: SpanKind

Returns the kind of the span.

Returns the kind of the span.

Attributes

Source
SpanRef.scala
def name: F[String]

Returns the name of the span.

Returns the name of the span.

Attributes

Note

the name of the span can be changed during the lifetime of the span by using Span.updateName, so this value cannot be cached.

Source
SpanRef.scala

Returns the parent's span context of the span.

Returns the parent's span context of the span.

Attributes

Source
SpanRef.scala

Returns the instrumentation scope specified when creating the tracer which produced this span.

Returns the instrumentation scope specified when creating the tracer which produced this span.

Attributes

Source
SpanRef.scala

Returns an immutable instance of the SpanData, for use in export.

Returns an immutable instance of the SpanData, for use in export.

Attributes

Source
SpanRef.scala

Inherited methods

Attributes

Inherited from:
Backend
Source
Span.scala

Attributes

Inherited from:
Backend
Source
Span.scala

Attributes

Inherited from:
Backend
Source
Span.scala

Attributes

Inherited from:
Backend
Source
Span.scala
final def mapK[G[_]](implicit kt: KindTransformer[F, G]): Backend[G]

Modify the context F using an implicit KindTransformer from F to G.

Modify the context F using an implicit KindTransformer from F to G.

Attributes

Inherited from:
Backend
Source
Span.scala
def mapK[G[_]](f: FunctionK[F, G]): Backend[G]

Modify the context F using the transformation f.

Modify the context F using the transformation f.

Attributes

Inherited from:
Backend
Source
Span.scala

Attributes

Inherited from:
Backend
Source
Span.scala

Attributes

Inherited from:
Backend
Source
Span.scala

Attributes

Inherited from:
Backend
Source
Span.scala

Attributes

Inherited from:
Backend
Source
Span.scala

Attributes

Inherited from:
Backend
Source
Span.scala