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 = "") #

Class Method Detail

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

def self.validate_id(id : Slice(UInt8)) #

def self.validate_id(id : Slice) #

Instance Method Detail

def [](key) #

def []=(key, value) #

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

def add_event(name = "", &) #

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

This is probably a property


def attributes=(attributes : Hash(String, AnyAttribute)) #

def can_export? #

def children : Array(Span) #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def children=(children : Array(Span)) #

def client! #

def consumer! #

def context : SpanContext #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def context=(context : SpanContext) #

def end_time_unix_nano #

def events : Array(Event) #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def events=(events : Array(Event)) #

def finish : Time::Span | Nil #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def finish=(finish : Time::Span | Nil) #

def get_attribute(key) #

def id #

def internal! #

def is_recording : Bool #

ameba:disable Naming/QueryBoolMethods


def is_recording=(is_recording : Bool) #

ameba:disable Naming/QueryBoolMethods


def kind : Kind #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def kind=(kind : Kind) #

def name : String #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def name=(name : String) #

def parent : Span | Nil #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def parent=(parent : Span | Nil) #

def pb_span_kind #

def pb_span_status #

def producer! #

def recording? : Bool #

def server! #

def set_attribute(key, value) #

def span_id #

def start : Time::Span #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def start=(start : Time::Span) #

def start_time_unix_nano #

def status : Status #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def status=(status : Status) #

def to_json(json : JSON::Builder) #

def to_json #

def to_protobuf #

Return the Protobuf object for the Span.


def wall_finish : Time | Nil #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def wall_finish=(wall_finish : Time | Nil) #

def wall_start : Time #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def wall_start=(wall_start : Time) #