opentelemetry-instrumentation-mysql2 0.24.0 → 0.24.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5556a962e40c18ff1e4c02618b9772bb6a9708bbcfa4867c62924118bfdf1de
4
- data.tar.gz: 856f5881c0c843902bf79b38969f9dc20e9286719ebccde33c4155a2f4b06e54
3
+ metadata.gz: 1f086bc035af9f951109cd4e61e5f4f403c7f066d6c4d5f853465060c6cae2e8
4
+ data.tar.gz: 81bc9f183786bf26cdbdaa44c4d176258b6446e242800ac8543c1d6ff11784c0
5
5
  SHA512:
6
- metadata.gz: 36a64234a88f39e07e957721e434633db8636c86467a457fe298492100c9c36f465b37aa36ee4f6a7b37d3747bb1df7c338077514b27e41f867697e19f1dda78
7
- data.tar.gz: 6c8f6ffa8a510838c2c559da473b57edd7024d21696bcc143a8bfad6eb6ccba86e021a11cb6b8e9a6deee56ee4dab711274685a3e6bd3792ac6b7fa7e861e44c
6
+ metadata.gz: 8013b7edd0e679422859c67e13d29c395d5e767e7d780f83b72cd5e302be7430a785c93edbe4ddb417abae4dffe86adcb566b2d39231cf94e4f26c3e55c625c1
7
+ data.tar.gz: 9312c12a1e1f465a83d2b2617309f91fcfd32d6271ad010b85e934517109e71204ce7796198e68f9e9cada715e7ef8d8a004080a211f4feb1d88db42b3db0fa2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-mysql2
2
2
 
3
+ ### v0.24.1 / 2023-06-01
4
+
5
+ * FIXED: Regex non-match with obfuscation limit (issue #486)
6
+
3
7
  ### v0.24.0 / 2023-05-25
4
8
 
5
9
  * ADDED: Add config[:obfuscation_limit] to pg and mysql2
@@ -72,8 +72,12 @@ module OpenTelemetry
72
72
 
73
73
  def obfuscate_sql(sql)
74
74
  if sql.size > config[:obfuscation_limit]
75
- truncated_sql = sql[..sql.index(generated_mysql_regex) - 1]
76
- truncated_sql + "...\nSQL truncated (> #{config[:obfuscation_limit]} characters)"
75
+ first_match_index = sql.index(generated_mysql_regex)
76
+ truncation_message = "SQL truncated (> #{config[:obfuscation_limit]} characters)"
77
+ return truncation_message unless first_match_index
78
+
79
+ truncated_sql = sql[..first_match_index - 1]
80
+ "#{truncated_sql}...\n#{truncation_message}"
77
81
  else
78
82
  obfuscated = OpenTelemetry::Common::Utilities.utf8_encode(sql, binary: true)
79
83
  obfuscated = obfuscated.gsub(generated_mysql_regex, '?')
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Mysql2
10
- VERSION = '0.24.0'
10
+ VERSION = '0.24.1'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-mysql2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.24.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-25 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -227,10 +227,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
227
227
  licenses:
228
228
  - Apache-2.0
229
229
  metadata:
230
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-mysql2/0.24.0/file/CHANGELOG.md
230
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-mysql2/0.24.1/file/CHANGELOG.md
231
231
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/mysql2
232
232
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
233
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-mysql2/0.24.0
233
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-mysql2/0.24.1
234
234
  post_install_message:
235
235
  rdoc_options: []
236
236
  require_paths: