struct

Tracing::SpanRef

Inherits Struct < Value < Object

A reference to span data with mutable extensions access.

Ported from upstream tracing_subscriber::registry::SpanRef.

Constructors

new(name : String, metadata : Tracing::Core::Metadata, parent_id : Tracing::Core::Span::Id | Nil, registry : Tracing::Registry, span_id : Tracing::Core::Span::Id)
Source

Instance methods

extensions

Get immutable access to span extensions.

Source
extensions_mut

Get mutable access to span extensions.

Source
id

Returns this span's ID.

Source
metadata
Source
name
Source
parent

Returns this span's parent SpanRef, or nil if it is a root span.

Source
parent_id
Source
scope

Returns an iterator over this span and its ancestors, ordered leaf to root (this span first, then its parent, and so on). Mirrors upstream SpanRef::scope; call #from_root on the result to reverse the order.

Source