Class: StackifyRubyAPM::AgentBaseTransport Private
- Inherits:
-
Object
- Object
- StackifyRubyAPM::AgentBaseTransport
- Includes:
- Log
- Defined in:
- lib/stackify_apm/transport/agent_base.rb
Overview
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.
This class will take care of building a protobuf message.
Direct Known Subclasses
Constant Summary
Constants included from Log
Instance Method Summary collapse
-
#build_message(transactions = []) ⇒ Object
private
This method will build a group of Stackify::Traces from the protobuf objects.
-
#initialize(config) ⇒ AgentBaseTransport
constructor
private
A new instance of AgentBaseTransport.
- #post(_transactions = []) ⇒ Object private
Methods included from Log
#debug, #error, #fatal, #info, #log, #warn
Constructor Details
#initialize(config) ⇒ AgentBaseTransport
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 AgentBaseTransport.
10 11 12 13 |
# File 'lib/stackify_apm/transport/agent_base.rb', line 10 def initialize(config) @config = config @transaction_serializers = Serializers::Transactions.new(config) end |
Instance Method Details
#build_message(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.
This method will build a group of Stackify::Traces from the protobuf objects. It accept Array of transactions.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/stackify_apm/transport/agent_base.rb', line 17 def (transactions = []) # convert transactions to protobuf traces = StackifyProtoBuf::Traces.new transactions.each do |transaction| # convert transaction to protobuf protobuf_transaction = @transaction_serializers.build_protobuf(@config, transaction) # add to traces array traces.traces.push(protobuf_transaction) end return traces rescue StandardError => e debug "[AgentBaseTransport] build_message() exception: #{e.inspect}" end |
#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.
31 32 33 |
# File 'lib/stackify_apm/transport/agent_base.rb', line 31 def post(_transactions = []) raise NotImplementedError end |