Class: StackifyRubyAPM::TraceLogger Private

Inherits:
Object
  • Object
show all
Includes:
Log
Defined in:
lib/stackify_apm/trace_logger.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary

Constants included from Log

Log::PREFIX

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Log

#debug, #error, #fatal, #info, #log, #warn

Constructor Details

#initialize(config) ⇒ TraceLogger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TraceLogger.



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/stackify_apm/trace_logger.rb', line 13

def initialize(config)
  @config = config
  @trace_file_counter = 0
  begin
    @transaction_serializers = Serializers::Transactions.new(config)
    @transport = StackifyRubyAPM::TransportSelector.new(@config).transport
  rescue StandardError => exception
    debug '[TraceLogger] initialize()' if ENV['STACKIFY_TRANSPORT_LOG_LEVEL'] == '0'
    debug exception.inspect
  end
end

Instance Attribute Details

#trace_file_counterObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



25
26
27
# File 'lib/stackify_apm/trace_logger.rb', line 25

def trace_file_counter
  @trace_file_counter
end

Instance Method Details

#post(transactions = []) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
# File 'lib/stackify_apm/trace_logger.rb', line 27

def post(transactions = [])
  @transport.post(transactions)
end