class OpenTelemetry::LogRecord

Included Modules

Defined in:

log.cr

Constant Summary

NAME_OFFSETS = {"UNSPECIFIED" => ->(_n : Int32) do 0 end, "TRACE" => ->(n : Int32) do n + 1 end, "DEBUG" => ->(n : Int32) do n + 5 end, "INFO" => ->(n : Int32) do n + 9 end, "WARN" => ->(n : Int32) do n + 13 end, "ERROR" => ->(n : Int32) do n + 17 end, "FATAL" => ->(n : Int32) do n + 21 end}

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module OpenTelemetry::Sendable

size size, to_json to_json, to_protobuf to_protobuf

Constructor Detail

def self.new(severity : Level = Level::Unspecified, severity_text : String | Nil = nil, body : ValueTypes | Nil = nil, time : Time | Nil = nil, observed_time : Time | Nil = nil, trace_id : Slice(UInt8) | Nil = nil, span_id : Slice(UInt8) | Nil = nil, flags : TraceFlags = TraceFlags.new(0), exporter : Exporter | Nil = nil) #

[View source]
def self.new(severity : String = "UNSPECIFIED", severity_text : String | Nil = nil, body : ValueTypes | Nil = nil, time : Time | Nil = nil, observed_time : Time | Nil = nil, trace_id : Slice(UInt8) | Nil = nil, span_id : Slice(UInt8) | Nil = nil, flags : TraceFlags = TraceFlags.new(0), exporter : Exporter | Nil = nil) #

[View source]
def self.new(severity : Int = 0, severity_text : String | Nil = nil, body : ValueTypes | Nil = nil, time : Time | Nil = nil, observed_time : Time | Nil = nil, trace_id : Slice(UInt8) | Nil = nil, span_id : Slice(UInt8) | Nil = nil, flags : TraceFlags = TraceFlags.new(0), exporter : Exporter | Nil = nil) #

[View source]

Class Method Detail

def self.severity_from_name(name) #

[View source]
def self.severity_from_number(number) #

[View source]

Instance Method Detail

def [](key) #

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

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

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

[View source]
def body #

[View source]
def body=(val) #

[View source]
def dropped_attribute_count : UInt32 #

[View source]
def dropped_attribute_count=(dropped_attribute_count : UInt32) #

[View source]
def export #

Individual logs can export themselves. This is less efficient than using a LogProvider, and allowing the LogProvider to export larger chucks of logs, but this capability may be useful if log volume is not large.


[View source]
def exporter : Exporter | Nil #

[View source]
def exporter=(exporter : Exporter | Nil) #

[View source]
def flags : TraceFlags #

[View source]
def flags=(flags : TraceFlags) #

[View source]
def get_attribute(key) #

[View source]
def merge_configuration_from_provider=(val) #

[View source]
def name : String | Nil #

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

[View source]
def observed_time : Time | Nil #

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

[View source]
def observed_time_unix_nano #

[View source]
def schema_url : String #

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

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

[View source]
def severity : Level #

[View source]
def severity=(severity : Level) #

[View source]
def severity_text : String | Nil #

[View source]
def severity_text=(severity_text : String | Nil) #

[View source]
def span_id : Slice(UInt8) | Nil #

[View source]
def span_id=(span_id : Slice(UInt8) | Nil) #

[View source]
def time : Time | Nil #

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

[View source]
def time_unix_nano #

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

[View source]
def to_json #

[View source]
def to_protobuf #

The ProtoBuf differs a LOT from the current Spec. Methinks this has changed a bunch since I last updated it.


[View source]
def trace_id : Slice(UInt8) | Nil #

[View source]
def trace_id=(trace_id : Slice(UInt8) | Nil) #

[View source]