class OpenTelemetry::Proto::Trace::V1::Span
- OpenTelemetry::Proto::Trace::V1::Span
- Reference
- Object
Included Modules
- Protobuf::Message
Defined in:
opentelemetry.crproto/trace.pb.cr
Constant Summary
-
FIELDS =
{1 => {name: :trace_id, pb_type: :bytes, crystal_type: Slice(UInt8), cast_type: Slice(UInt8)?, native: true, optional: true, repeated: false, default: nil, packed: false}, 2 => {name: :span_id, pb_type: :bytes, crystal_type: Slice(UInt8), cast_type: Slice(UInt8)?, native: true, optional: true, repeated: false, default: nil, packed: false}, 3 => {name: :trace_state, pb_type: :string, crystal_type: String, cast_type: String?, native: true, optional: true, repeated: false, default: nil, packed: false}, 4 => {name: :parent_span_id, pb_type: :bytes, crystal_type: Slice(UInt8), cast_type: Slice(UInt8)?, native: true, optional: true, repeated: false, default: nil, packed: false}, 5 => {name: :name, pb_type: :string, crystal_type: String, cast_type: String?, native: true, optional: true, repeated: false, default: nil, packed: false}, 6 => {name: :kind, pb_type: Span::SpanKind, crystal_type: Span::SpanKind, cast_type: Span::SpanKind?, native: false, optional: true, repeated: false, default: nil, packed: false}, 7 => {name: :start_time_unix_nano, pb_type: :fixed64, crystal_type: UInt64, cast_type: UInt64?, native: true, optional: true, repeated: false, default: nil, packed: false}, 8 => {name: :end_time_unix_nano, pb_type: :fixed64, crystal_type: UInt64, cast_type: UInt64?, native: true, optional: true, repeated: false, default: nil, packed: false}, 9 => {name: :attributes, pb_type: OpenTelemetry::Proto::Common::V1::KeyValue, crystal_type: OpenTelemetry::Proto::Common::V1::KeyValue, cast_type: Array(OpenTelemetry::Proto::Common::V1::KeyValue)?, native: false, optional: true, repeated: true, default: nil, packed: false}, 10 => {name: :dropped_attributes_count, pb_type: :uint32, crystal_type: UInt32, cast_type: UInt32?, native: true, optional: true, repeated: false, default: nil, packed: false}, 11 => {name: :events, pb_type: Span::Event, crystal_type: Span::Event, cast_type: Array(Span::Event)?, native: false, optional: true, repeated: true, default: nil, packed: false}, 12 => {name: :dropped_events_count, pb_type: :uint32, crystal_type: UInt32, cast_type: UInt32?, native: true, optional: true, repeated: false, default: nil, packed: false}, 13 => {name: :links, pb_type: Span::Link, crystal_type: Span::Link, cast_type: Array(Span::Link)?, native: false, optional: true, repeated: true, default: nil, packed: false}, 14 => {name: :dropped_links_count, pb_type: :uint32, crystal_type: UInt32, cast_type: UInt32?, native: true, optional: true, repeated: false, default: nil, packed: false}, 15 => {name: :status, pb_type: Status, crystal_type: Status, cast_type: Status?, native: false, optional: true, repeated: false, default: nil, packed: false}} of Int32 => HashLiteral(Symbol, ASTNode)
Constructors
- .new(buf : Protobuf::Buffer)
- .new(trace_id : Slice(UInt8) | Nil = nil, span_id : Slice(UInt8) | Nil = nil, trace_state : String | Nil = nil, parent_span_id : Slice(UInt8) | Nil = nil, name : String | Nil = nil, kind : Span::SpanKind | Nil = nil, start_time_unix_nano : UInt64 | Nil = nil, end_time_unix_nano : UInt64 | Nil = nil, attributes : Array(OpenTelemetry::Proto::Common::V1::KeyValue) | Nil = nil, dropped_attributes_count : UInt32 | Nil = nil, events : Array(Span::Event) | Nil = nil, dropped_events_count : UInt32 | Nil = nil, links : Array(Span::Link) | Nil = nil, dropped_links_count : UInt32 | Nil = nil, status : Status | Nil = nil)
Class Method Summary
Instance Method Summary
- #[](key : String)
-
#[]=(key : String, value)
Shorthand for adding an attribute to a span
- #[]?(key : String)
- #attributes : Array(OpenTelemetry::Proto::Common::V1::KeyValue) | Nil
- #attributes=(attributes : Array(OpenTelemetry::Proto::Common::V1::KeyValue) | Nil)
- #dropped_attributes_count : UInt32 | Nil
- #dropped_attributes_count=(dropped_attributes_count : UInt32 | Nil)
- #dropped_events_count : UInt32 | Nil
- #dropped_events_count=(dropped_events_count : UInt32 | Nil)
- #dropped_links_count : UInt32 | Nil
- #dropped_links_count=(dropped_links_count : UInt32 | Nil)
- #end_time_unix_nano : UInt64 | Nil
- #end_time_unix_nano=(end_time_unix_nano : UInt64 | Nil)
- #events : Array(Span::Event) | Nil
- #events=(events : Array(Span::Event) | Nil)
- #kind : Span::SpanKind | Nil
- #kind=(kind : Span::SpanKind | Nil)
- #links : Array(Span::Link) | Nil
- #links=(links : Array(Span::Link) | Nil)
- #missing_attribute!(key : String)
- #name : String | Nil
- #name=(name : String | Nil)
- #parent_span_id : Slice(UInt8) | Nil
- #parent_span_id=(parent_span_id : Slice(UInt8) | Nil)
- #span_id : Slice(UInt8) | Nil
- #span_id=(span_id : Slice(UInt8) | Nil)
- #start_time_unix_nano : UInt64 | Nil
- #start_time_unix_nano=(start_time_unix_nano : UInt64 | Nil)
- #status : Status | Nil
- #status=(status : Status | Nil)
- #to_protobuf(io : IO, embedded = false)
- #to_protobuf
- #trace_id : Slice(UInt8) | Nil
- #trace_id=(trace_id : Slice(UInt8) | Nil)
- #trace_state : String | Nil
- #trace_state=(trace_state : String | Nil)
Constructor Detail
def self.new(trace_id : Slice(UInt8) | Nil = nil, span_id : Slice(UInt8) | Nil = nil, trace_state : String | Nil = nil, parent_span_id : Slice(UInt8) | Nil = nil, name : String | Nil = nil, kind : Span::SpanKind | Nil = nil, start_time_unix_nano : UInt64 | Nil = nil, end_time_unix_nano : UInt64 | Nil = nil, attributes : Array(OpenTelemetry::Proto::Common::V1::KeyValue) | Nil = nil, dropped_attributes_count : UInt32 | Nil = nil, events : Array(Span::Event) | Nil = nil, dropped_events_count : UInt32 | Nil = nil, links : Array(Span::Link) | Nil = nil, dropped_links_count : UInt32 | Nil = nil, status : Status | Nil = nil)
#