Class: Datadog::Profiling::Exporter

Inherits:
Object
  • Object
show all
Defined in:
lib/ddtrace/profiling/exporter.rb

Overview

Writes profiling data to a given transport

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ Exporter

Returns a new instance of Exporter.



11
12
13
14
15
16
17
# File 'lib/ddtrace/profiling/exporter.rb', line 11

def initialize(transport)
  unless transport.is_a?(Profiling::Transport::Client)
    raise ArgumentError, 'Unsupported transport for profiling exporter.'
  end

  @transport = transport
end

Instance Attribute Details

#transportObject (readonly)

Returns the value of attribute transport.



8
9
10
# File 'lib/ddtrace/profiling/exporter.rb', line 8

def transport
  @transport
end

Instance Method Details

#export(flush) ⇒ Object



19
20
21
# File 'lib/ddtrace/profiling/exporter.rb', line 19

def export(flush)
  transport.send_profiling_flush(flush)
end