class OpenTelemetry::LogRecord
- OpenTelemetry::LogRecord
- Reference
- Object
Included Modules
Defined in:
log.crConstant 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
- .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)
- .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)
- .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)
Class Method Summary
Instance Method Summary
- #[](key)
- #[]=(key, value)
- #attributes : Hash(String, AnyAttribute)
- #attributes=(attributes : Hash(String, AnyAttribute))
- #body
- #body=(val)
- #dropped_attribute_count : UInt32
- #dropped_attribute_count=(dropped_attribute_count : UInt32)
-
#export
Individual logs can export themselves.
- #exporter : Exporter | Nil
- #exporter=(exporter : Exporter | Nil)
- #flags : TraceFlags
- #flags=(flags : TraceFlags)
- #get_attribute(key)
- #merge_configuration_from_provider=(val)
- #name : String | Nil
- #name=(name : String | Nil)
- #observed_time : Time | Nil
- #observed_time=(observed_time : Time | Nil)
- #observed_time_unix_nano
- #schema_url : String
- #schema_url=(schema_url : String)
- #set_attribute(key, value)
- #severity : Level
- #severity=(severity : Level)
- #severity_text : String | Nil
- #severity_text=(severity_text : String | Nil)
- #span_id : Slice(UInt8) | Nil
- #span_id=(span_id : Slice(UInt8) | Nil)
- #time : Time | Nil
- #time=(time : Time | Nil)
- #time_unix_nano
- #to_json(json : JSON::Builder)
- #to_json
-
#to_protobuf
The ProtoBuf differs a LOT from the current Spec.
- #trace_id : Slice(UInt8) | Nil
- #trace_id=(trace_id : Slice(UInt8) | Nil)
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)
#
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)
#
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)
#
Class Method Detail
Instance Method Detail
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.
def to_protobuf
#
The ProtoBuf differs a LOT from the current Spec. Methinks this has changed a bunch since I last updated it.