Module: TingYun::Instrumentation::Support::EventFormatter

Defined in:
lib/ting_yun/instrumentation/support/event_formatter.rb

Class Method Summary collapse

Class Method Details

.format(command_name, database_name, command, host = "localhost", port = "27017", nosql = "") ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ting_yun/instrumentation/support/event_formatter.rb', line 7

def self.format(command_name, database_name, command,host="localhost",port="27017", nosql="")
  result = {
      :operation => command_name,
      :database => database_name,
      :collection => command.values.first,
      :term => command.values.last,
      :product => "Mongo",
      :type=>"Mongo",
      :host => host,
      :port => port,
      :nosql => nosql
  }
  result
end