module TingYun::Instrumentation::Support::MongoFormatter
Constants
- OBFUSCATE_KEYS
- PLAINTEXT_KEYS
Public Class Methods
format(statement, operation)
click to toggle source
# File lib/ting_yun/instrumentation/support/mongo_formatter.rb, line 25 def self.format(statement, operation) result = {:operation => operation} PLAINTEXT_KEYS.each do |key| result[key] = statement[key] if statement.key?(key) end OBFUSCATE_KEYS.each do |key| if statement.key?(key) && statement[key] obfuscated = obfuscate(statement[key]) result[key] = obfuscated if obfuscated end end result end
obfuscate(statement)
click to toggle source
# File lib/ting_yun/instrumentation/support/mongo_formatter.rb, line 42 def self.obfuscate(statement) statement = Obfuscator.obfuscate_statement(statement) statement end