class OpenTelemetry::Span

Overview

A Span represents a single measured timespan, and all data associated with that measurement. A Span may nest other Span instances.

Included Modules

Defined in:

lib/opentelemetry-sdk/src/span.cr
lib/opentelemetry-sdk/src/span/kind.cr
ext/open_telemetry/span_links.cr

Instance Method Summary

Instance Method Detail

def add_link(context : SpanContext, attributes : Hash(String, AnyAttribute) = {} of String => AnyAttribute) : Nil #

The pinned SDK protobuf supports links, but Span does not expose them yet. Keep the extension local so template send spans can export link metadata.


[View source]
def add_link(context : SpanContext, attributes : Hash(String, _) = {} of String => String) : Nil #

[View source]
def links : Array(Proto::Trace::V1::Span::Link) #

[View source]
def to_json(json : JSON::Builder) #

[View source]
def to_protobuf #

Return the Protobuf object for the Span.


[View source]