lib/one_apm/inst/nosql/mongo2.rb in oneapm_rpm-1.3.6 vs lib/one_apm/inst/nosql/mongo2.rb in oneapm_rpm-1.3.7.rc1
- old
+ new
@@ -3,40 +3,40 @@
module OneApm
module Agent
module Instrumentation
class MongoCommandSubscriber
- MONGODB = 'MongoDB'.freeze
- STARTED = 'STARTED'.freeze
- SUCCEEDED = 'SUCCEEDED'.freeze
- FAILED = 'FAILED'.freeze
+ OA_MONGODB = 'MongoDB'.freeze
+ OA_STARTED = 'STARTED'.freeze
+ OA_SUCCEEDED = 'SUCCEEDED'.freeze
+ OA_FAILED = 'FAILED'.freeze
def started(event)
begin
return unless OneApm::Manager.tl_is_execution_traced?
operations[event.operation_id] = event
rescue Exception => e
- log_operations_error(STARTED, e)
+ log_operations_error(OA_STARTED, e)
end
end
def succeeded(event)
- operator SUCCEEDED, event
+ operator OA_SUCCEEDED, event
end
def failed(event)
- operator FAILED, event
+ operator OA_FAILED, event
end
private
def operations
@operations ||= {}
end
def mertircs(event)
OneApm::Agent::Datastore::MetricHelper.metrics_for(
- MONGODB, event.command_name, event.command.values.first
+ OA_MONGODB, event.command_name, event.command.values.first
)
end
def operator(operator_type, event)
begin
\ No newline at end of file