Module: AppOpticsAPM::SDK::Logging
- Included in:
- AppOpticsAPM::SDK
- Defined in:
- lib/appoptics_apm/sdk/logging.rb
Instance Method Summary collapse
-
#log_exception(exception, opts = {}) ⇒ Object
Log an exception/error event in the current span.
-
#log_info(opts) ⇒ Object
Log an information event in the current span.
Instance Method Details
#log_exception(exception, opts = {}) ⇒ Object
Log an exception/error event in the current span
this may be helpful to track problems when an exception is rescued
Arguments:
-
exception
- an exception, must respond to :message and :backtrace -
opts
- (optional) hash containing key/value pairs that will be reported with this span.
28 29 30 |
# File 'lib/appoptics_apm/sdk/logging.rb', line 28 def log_exception(exception, opts = {}) AppOpticsAPM::API.log_exception(AppOpticsAPM.layer, exception, opts) end |
#log_info(opts) ⇒ Object
Log an information event in the current span
a possible use-case is to collect extra information during the execution of a request
Arguments:
-
opts
- (optional) hash containing key/value pairs that will be reported with this span.
16 17 18 |
# File 'lib/appoptics_apm/sdk/logging.rb', line 16 def log_info(opts) AppOpticsAPM::API.log_info(AppOpticsAPM.layer, opts) end |