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:

span.cr
span/kind.cr

Constant Summary

MATCH = /(?<span_id>[A-Fa-f0-9]{16})/

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module OpenTelemetry::Sendable

size size, to_json to_json, to_protobuf to_protobuf

Instance methods inherited from module OpenTelemetry::Sendable

size size, to_json to_json, to_protobuf to_protobuf

Constructor Detail

def self.new(name : String = "") #

[View source]

Class Method Detail

def self.build(name = "", &) #

[View source]
def self.validate_id(id : Slice(UInt8)) #

[View source]
def self.validate_id(id : Slice) #

[View source]

Instance Method Detail

def [](key) #

[View source]
def []=(key, value) #

[View source]
def add_event(name, attributes : Hash(String, AnyAttribute) = {} of String => AnyAttribute) #

[View source]
def add_event(name = "", &) #

[View source]
def attributes : Hash(String, AnyAttribute) #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def attributes=(attributes : Hash(String, AnyAttribute)) #

[View source]
def can_export? #

[View source]
def children : Array(Span) #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def children=(children : Array(Span)) #

[View source]
def client! #

[View source]
def consumer! #

[View source]
def context : SpanContext #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def context=(context : SpanContext) #

[View source]
def end_time_unix_nano #

[View source]
def events : Array(Event) #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def events=(events : Array(Event)) #

[View source]
def finish : Time::Span | Nil #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def finish=(finish : Time::Span | Nil) #

[View source]
def get_attribute(key) #

[View source]
def id #

[View source]
def internal! #

[View source]
def is_recording : Bool #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def is_recording=(is_recording : Bool) #

[View source]
def kind : Kind #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def kind=(kind : Kind) #

[View source]
def name : String #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def name=(name : String) #

[View source]
def parent : Span | Nil #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def parent=(parent : Span | Nil) #

[View source]
def pb_span_kind #

[View source]
def pb_span_status #

[View source]
def producer! #

[View source]
def recording? : Bool #

[View source]
def server! #

[View source]
def set_attribute(key, value) #

[View source]
def span_id #

[View source]
def start : Time::Span #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def start=(start : Time::Span) #

[View source]
def start_time_unix_nano #

[View source]
def status : Status #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def status=(status : Status) #

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

[View source]
def to_json #

[View source]
def to_protobuf #

Return the Protobuf object for the Span.


[View source]
def wall_finish : Time | Nil #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def wall_finish=(wall_finish : Time | Nil) #

[View source]
def wall_start : Time #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


[View source]
def wall_start=(wall_start : Time) #

[View source]