abstract class OpenTelemetry::API::AbstractSpan

Overview

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

Included Modules

Direct Known Subclasses

Defined in:

api/abstract_span.cr
api/span/abstract_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(json : JSON::Builder)
to_json
to_json
, to_protobuf to_protobuf

Constructor Detail

def self.new(name = "") #

[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

abstract def [](key) #

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

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

[View source]
abstract def add_event(name = "", &blk : Event -> ) #

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

This is probably a property


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

[View source]
abstract def can_export? #

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

This is probably a property


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

[View source]
abstract def context : SpanContext #

This is probably a property


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

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

This is probably a property


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

[View source]
abstract def finish : Time::Span | Nil #

This is probably a property


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

[View source]
abstract def get_attribute(key) #

[View source]
abstract def id #

[View source]
abstract def is_recording : Bool #

This is probably a property


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

[View source]
abstract def kind : Kind #

This is probably a property


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

[View source]
abstract def name : String #

This is probably a property


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

[View source]
abstract def parent : Span | Nil #

This is probably a property


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

[View source]
abstract def recording? #

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

[View source]
abstract def span_id #

[View source]
abstract def start : Time::Span #

This is probably a property


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

[View source]
abstract def status : Status #

This is probably a property


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

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

[View source]
abstract def to_json #

[View source]
abstract def to_protobuf #

Return the Protobuf object for the Span.


[View source]
abstract def wall_finish : Time | Nil #

This is probably a property


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

[View source]
abstract def wall_start : Time #

This is probably a property


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

[View source]