class OpenTelemetry::API::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:

api/span.cr
api/span/kind.cr

Constant Summary

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

Constructors

Instance Method Summary

Instance methods inherited from module OpenTelemetry::Sendable

size size, to_json(json : JSON::Builder)
to_json
to_json
, to_protobuf to_protobuf

Instance methods inherited from class OpenTelemetry::API::AbstractSpan

[](key) [], []=(key, value) []=, add_event(name, attributes : Hash(String, AnyAttribute) = {} of String => AnyAttribute)
add_event(name = "", &blk : Event -> )
add_event
, attributes : Hash(String, AnyAttribute) attributes, attributes=(attributes : Hash(String, AnyAttribute)) attributes=, can_export? can_export?, children : Array(Span) children, children=(children : Array(Span)) children=, context : SpanContext context, context=(context : SpanContext) context=, events : Array(Event) events, events=(events : Array(Event)) events=, finish : Time::Span? finish, finish=(finish : Time::Span?) finish=, get_attribute(key) get_attribute, id id, is_recording : Bool is_recording, is_recording=(is_recording : Bool) is_recording=, kind : Kind kind, kind=(kind : Kind) kind=, name : String name, name=(name : String) name=, parent : Span? parent, parent=(parent : Span?) parent=, recording? recording?, set_attribute(key, value) set_attribute, span_id span_id, start : Time::Span start, start=(start : Time::Span) start=, status : Status status, status=(status : Status) status=, to_json(json : JSON::Builder)
to_json
to_json
, to_protobuf to_protobuf, wall_finish : Time? wall_finish, wall_finish=(wall_finish : Time?) wall_finish=, wall_start : Time wall_start, wall_start=(wall_start : Time) wall_start=

Constructor methods inherited from class OpenTelemetry::API::AbstractSpan

new(name = "") new

Class methods inherited from class OpenTelemetry::API::AbstractSpan

build(name = "", &) build, validate_id(id : Slice(UInt8))
validate_id(id : Slice)
validate_id

Instance methods inherited from module OpenTelemetry::Sendable

size size, to_json(json : JSON::Builder)
to_json
to_json
, to_protobuf to_protobuf

Constructor Detail

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

Instance Method Detail

def [](key) #

def []=(key, value) #

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

def add_event(name = "", &blk : Event -> ) #

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 events : Array(Event) #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


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

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

This is probably a property


def finish=(finish : Time::Span?) #

def get_attribute(key) #

def id #

def internal! #

def is_recording : Bool #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def is_recording=(is_recording : Bool) #

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? #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def parent=(parent : Span?) #

def producer! #

def recording? #

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 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? #
Description copied from class OpenTelemetry::API::AbstractSpan

This is probably a property


def wall_finish=(wall_finish : Time?) #

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

This is probably a property


def wall_start=(wall_start : Time) #