diff --git a/lib/datadog/tracing/contrib/utils/quantization/http.rb b/lib/datadog/tracing/contrib/utils/quantization/http.rb index bc208d6c2bf..3e7d1196ee0 100644 --- a/lib/datadog/tracing/contrib/utils/quantization/http.rb +++ b/lib/datadog/tracing/contrib/utils/quantization/http.rb @@ -134,18 +134,18 @@ def obfuscate_query(query, options = {}) (?:"|%22)? ) (?: # common keys - (?:old_?|new_?)?p(?:ass)?w(?:or)?d(?:1|2)? # pw, password variants - |pass(?:_?phrase)? # pass, passphrase variants + (?:old[-_]?|new_?)?p(?:ass)?w(?:or)?d(?:1|2)? # pw, password variants + |pass(?:[-_]?phrase)? # pass, passphrase variants |secret |(?: # key, key_id variants - api_? - |private_? - |public_? - |access_? - |secret_? - )key(?:_?id)? + api[-_]? + |private[-_]? + |public[-_]? + |access[-_]? + |secret[-_]? + )key(?:[-_]?id)? |token - |consumer_?(?:id|key|secret) + |consumer[-_]?(?:id|key|secret) |sign(?:ed|ature)? |auth(?:entication|orization)? ) diff --git a/spec/datadog/tracing/contrib/utils/quantization/http_spec.rb b/spec/datadog/tracing/contrib/utils/quantization/http_spec.rb index a34ba6083a0..d3f3f05a615 100644 --- a/spec/datadog/tracing/contrib/utils/quantization/http_spec.rb +++ b/spec/datadog/tracing/contrib/utils/quantization/http_spec.rb @@ -496,6 +496,13 @@ public_key_id access_key_id secret_key_id + api-key + api-key-id + private-key + private-key-id + public-key-id + access-key-id + secret-key-id token consumerid consumerkey @@ -503,6 +510,9 @@ consumer_id consumer_key consumer_secret + consumer-id + consumer-key + consumer-secret sign signed signature