From 15a3d105f5592415cc5515444a3115f700091cb6 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle Date: Fri, 6 Sep 2024 10:29:29 -0700 Subject: [PATCH] fix: Revert obfuscation limit change --- helpers/sql-obfuscation/README.md | 2 +- .../lib/opentelemetry/helpers/sql_obfuscation.rb | 2 +- .../lib/opentelemetry/instrumentation/mysql2/instrumentation.rb | 2 +- .../pg/lib/opentelemetry/instrumentation/pg/instrumentation.rb | 2 +- .../opentelemetry/instrumentation/trilogy/instrumentation.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helpers/sql-obfuscation/README.md b/helpers/sql-obfuscation/README.md index c518d1b08..1e86bacdf 100644 --- a/helpers/sql-obfuscation/README.md +++ b/helpers/sql-obfuscation/README.md @@ -26,7 +26,7 @@ end Make sure the `Instrumentation` class for your gem contains configuration options for: - `:obfuscation_limit`: the length at which the obfuscated SQL string will be truncated. - Example: `option :obfuscation_limit, default: 16384, validate: :integer` + Example: `option :obfuscation_limit, default: 2000, validate: :integer` If you want to add support for a new adapter, update the following constants to include keys for your adapter: diff --git a/helpers/sql-obfuscation/lib/opentelemetry/helpers/sql_obfuscation.rb b/helpers/sql-obfuscation/lib/opentelemetry/helpers/sql_obfuscation.rb index a773d99ef..a09025102 100644 --- a/helpers/sql-obfuscation/lib/opentelemetry/helpers/sql_obfuscation.rb +++ b/helpers/sql-obfuscation/lib/opentelemetry/helpers/sql_obfuscation.rb @@ -20,7 +20,7 @@ module Helpers # `option :db_statement, default: :include, validate: %I[omit include obfuscate]` # * `:obfuscation_limit` # Example: - # `option :obfuscation_limit, default: 16384, validate: :integer` + # `option :obfuscation_limit, default: 2000, validate: :integer` # # If you want to add support for a new adapter, update the following # constants to include keys for your adapter: diff --git a/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/instrumentation.rb b/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/instrumentation.rb index 8fe5569de..9a7b78ccb 100644 --- a/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/instrumentation.rb +++ b/instrumentation/mysql2/lib/opentelemetry/instrumentation/mysql2/instrumentation.rb @@ -22,7 +22,7 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base option :peer_service, default: nil, validate: :string option :db_statement, default: :obfuscate, validate: %I[omit include obfuscate] option :span_name, default: :statement_type, validate: %I[statement_type db_name db_operation_and_name] - option :obfuscation_limit, default: 16384, validate: :integer + option :obfuscation_limit, default: 2000, validate: :integer private diff --git a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/instrumentation.rb b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/instrumentation.rb index d4b76db91..2eeb6ac66 100644 --- a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/instrumentation.rb +++ b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/instrumentation.rb @@ -26,7 +26,7 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base option :peer_service, default: nil, validate: :string option :db_statement, default: :obfuscate, validate: %I[omit include obfuscate] - option :obfuscation_limit, default: 16384, validate: :integer + option :obfuscation_limit, default: 2000, validate: :integer private diff --git a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/instrumentation.rb b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/instrumentation.rb index 88e706a1d..684fbe660 100644 --- a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/instrumentation.rb +++ b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/instrumentation.rb @@ -26,7 +26,7 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base option :peer_service, default: nil, validate: :string option :db_statement, default: :obfuscate, validate: %I[omit include obfuscate] option :span_name, default: :statement_type, validate: %I[statement_type db_name db_operation_and_name] - option :obfuscation_limit, default: 16384, validate: :integer + option :obfuscation_limit, default: 2000, validate: :integer option :propagator, default: nil, validate: :string attr_reader :propagator