Class: StackifyRubyAPM::RootInfo Private
- Inherits:
-
Object
- Object
- StackifyRubyAPM::RootInfo
- Defined in:
- lib/stackify_apm/root_info.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.
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object private
-
#initialize(config, transaction) ⇒ RootInfo
constructor
private
A new instance of RootInfo.
Constructor Details
#initialize(config, transaction) ⇒ RootInfo
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 RootInfo.
8 9 10 11 |
# File 'lib/stackify_apm/root_info.rb', line 8 def initialize(config, transaction) @transaction = transaction @config = config end |
Class Method Details
.build(config, transaction) ⇒ 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.
39 40 41 |
# File 'lib/stackify_apm/root_info.rb', line 39 def self.build(config, transaction) new(config, transaction).build end |
Instance Method Details
#build ⇒ 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.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/stackify_apm/root_info.rb', line 13 def build # get process id pid = $PID || Process.pid { CATEGORY: 'Ruby', APPLICATION_PATH: '/', APPLICATION_FILESYSTEM_PATH: @config.root_path, APPLICATION_NAME: @config.application_name, APPLICATION_ENV: @config.environment_name, REPORTING_URL: @transaction.name, METHOD: @transaction.context.request.method, STATUS: @transaction.context.response.status_code, URL: @transaction.context.request.url[:full], TRACETYPE: 'WEBAPP', TRACE_ID: @transaction.id, THREAD_ID: Thread.current.object_id, TRACE_SOURCE: 'Ruby', TRACE_TARGET: 'RETRACE', HOST_NAME: @config.hostname || `hostname`, OS_TYPE: 'LINUX', PROCESS_ID: pid, TRACE_VERSION: '2.0' } end |