Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat!: Update obfusaction limit
This obfuscation limit matches what New Relic uses for their Ruby agent.
The previous 2000 limit seemed arbitrary.
  • Loading branch information
kaylareopelle committed Sep 6, 2024
commit 3217b9046698dc92377d5354a62a5db6fbd056b4
2 changes: 1 addition & 1 deletion helpers/sql-obfuscation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2000, validate: :integer`
Example: `option :obfuscation_limit, default: 16384, validate: :integer`

If you want to add support for a new adapter, update the following constants to include keys for your adapter:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Helpers
# `option :db_statement, default: :include, validate: %I[omit include obfuscate]`
# * `:obfuscation_limit`
# Example:
# `option :obfuscation_limit, default: 2000, validate: :integer`
# `option :obfuscation_limit, default: 16384, validate: :integer`
#
# If you want to add support for a new adapter, update the following
# constants to include keys for your adapter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2000, validate: :integer
option :obfuscation_limit, default: 16384, validate: :integer

private

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2000, validate: :integer
option :obfuscation_limit, default: 16384, validate: :integer

private

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2000, validate: :integer
option :obfuscation_limit, default: 16384, validate: :integer
option :propagator, default: nil, validate: :string

attr_reader :propagator
Expand Down