Skip to content

Commit

Permalink
Merge pull request #99 from solarwinds/NH-64310
Browse files Browse the repository at this point in the history
NH-64310: remove the logic that set obfuscate for db from sw side
  • Loading branch information
xuan-cao-swi authored Jan 3, 2024
2 parents 96a873b + 1c0fbc8 commit 65c5a43
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 65c5a43

Please sign in to comment.