Class: Datadog::Tracing::Transport::Traces::EncodedParcel

Inherits:
Object
  • Object
show all
Includes:
Core::Transport::Parcel
Defined in:
lib/datadog/tracing/transport/traces.rb

Overview

Data transfer object for encoded traces

Instance Attribute Summary collapse

Attributes included from Core::Transport::Parcel

#data

Instance Method Summary collapse

Methods included from Core::Transport::Parcel

#encode_with

Constructor Details

#initialize(data, trace_count) ⇒ EncodedParcel

Returns a new instance of EncodedParcel.



19
20
21
22
# File 'lib/datadog/tracing/transport/traces.rb', line 19

def initialize(data, trace_count)
  super(data)
  @trace_count = trace_count
end

Instance Attribute Details

#trace_countObject (readonly)

Returns the value of attribute trace_count.



17
18
19
# File 'lib/datadog/tracing/transport/traces.rb', line 17

def trace_count
  @trace_count
end

Instance Method Details

#countObject



24
25
26
# File 'lib/datadog/tracing/transport/traces.rb', line 24

def count
  data.length
end