Module: Oboe::API::LayerInit
- Defined in:
- lib/oboe/api/layerinit.rb
Instance Method Summary collapse
-
#force_trace ⇒ Object
force_trace has been deprecated and will be removed in a subsequent version.
-
#report_init(layer) ⇒ Object
Internal: Report that instrumentation for the given layer has been installed, as well as the version of instrumentation and version of layer.
Instance Method Details
#force_trace ⇒ Object
force_trace has been deprecated and will be removed in a subsequent version.
30 31 32 33 34 35 36 37 38 |
# File 'lib/oboe/api/layerinit.rb', line 30 def force_trace Oboe.logger.warn "Oboe::API::LayerInit.force_trace has been deprecated and will be removed in a subsequent version." saved_mode = Oboe::Config[:tracing_mode] Oboe::Config[:tracing_mode] = 'always' yield ensure Oboe::Config[:tracing_mode] = saved_mode end |
#report_init(layer) ⇒ Object
Internal: Report that instrumentation for the given layer has been installed, as well as the version of instrumentation and version of layer.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/oboe/api/layerinit.rb', line 11 def report_init(layer) platform_info = { '__Init' => 1 } begin platform_info['Force'] = true platform_info['Ruby.Platform.Version'] = RUBY_PLATFORM platform_info['Ruby.Version'] = RUBY_VERSION platform_info['Ruby.Rails.Version'] = ::Rails.version if defined?(::Rails) platform_info['Ruby.Oboe.Version'] = ::Oboe::Version::STRING platform_info['Ruby.OboeHeroku.Version'] = ::OboeHeroku::Version::STRING if defined?(::OboeHeroku) rescue end start_trace(layer, nil, platform_info) { } end |