lib/opentelemetry/instrumentation/pg/instrumentation.rb in opentelemetry-instrumentation-pg-0.22.3 vs lib/opentelemetry/instrumentation/pg/instrumentation.rb in opentelemetry-instrumentation-pg-0.23.0
- old
+ new
@@ -9,27 +9,11 @@
module PG
# The Instrumentation class contains logic to detect and install the Pg instrumentation
class Instrumentation < OpenTelemetry::Instrumentation::Base
MINIMUM_VERSION = Gem::Version.new('1.1.0')
- install do |config|
- if config[:enable_sql_obfuscation]
- config[:db_statement] = :obfuscate
- OpenTelemetry.logger.warn(
- 'Instrumentation pg configuration option enable_sql_obfuscation has been deprecated,' \
- 'use db_statement option instead'
- )
- end
-
- unless config[:enable_statement_attribute]
- config[:db_statement] = :omit
- OpenTelemetry.logger.warn(
- 'Instrumentation pg configuration option enable_statement_attribute has been deprecated,' \
- 'use db_statement option instead'
- )
- end
-
+ install do |_config|
require_dependencies
patch_client
end
present do
@@ -39,11 +23,9 @@
compatible do
gem_version > Gem::Version.new(MINIMUM_VERSION)
end
option :peer_service, default: nil, validate: :string
- option :enable_sql_obfuscation, default: false, validate: :boolean
- option :enable_statement_attribute, default: true, validate: :boolean
option :db_statement, default: :include, validate: %I[omit include obfuscate]
private
def gem_version