Skip to content

Commit

Permalink
NH-64310: remove the logic that set obfuscate for db from sw side
Browse files Browse the repository at this point in the history
  • Loading branch information
xuan-cao-swi committed Jan 2, 2024
1 parent 5dfab97 commit 1c0fbc8
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/solarwinds_apm/otel_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,6 @@ def self.resolve_response_propagator
end
end

def self.obfuscate_helper(instrumentation)
if @@config_map[instrumentation] # user provided the option
@@config_map[instrumentation][:db_statement] = :obfuscate unless @@config_map[instrumentation][:db_statement] # user provided the db_statement, ignore our default setting
else
@@config_map[instrumentation] = {db_statement: :obfuscate}
end
end

def self.obfuscate_query
obfuscate_helper("OpenTelemetry::Instrumentation::Dalli")
obfuscate_helper("OpenTelemetry::Instrumentation::Mysql2")
obfuscate_helper("OpenTelemetry::Instrumentation::PG")
end

def self.[](key)
@@config[key.to_sym]
end
Expand Down Expand Up @@ -132,8 +118,6 @@ def self.initialize
resolve_solarwinds_processor
resolve_response_propagator

obfuscate_query

print_config if SolarWindsAPM.logger.level.zero?

ENV['OTEL_TRACES_EXPORTER'] = 'none' if ENV['OTEL_TRACES_EXPORTER'].to_s.empty?
Expand Down

0 comments on commit 1c0fbc8

Please sign in to comment.