opentelemetry-instrumentation-pg 0.24.0 → 0.25.0

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: f0c59fa49902f08ce89443d4b062b10d31b6e8c6a7741b2069e32c974079c07f
4
- data.tar.gz: 5530b1f69417c3bbcb9219fba0f5ae34d71741fcac4d496c247bbdb88384fe0c
3
+ metadata.gz: 708556793d4e7d3dfcfca9d3892b6f6a966baacd5abe1fa358861196fb8794a9
4
+ data.tar.gz: fce3c184ff8338d93644b0b5bf8d02bf328887c1b342140e574c6c5b20b454a6
5
5
  SHA512:
6
- metadata.gz: e52b890b4f7008ae18888810e58a5bba899d20877f446467ae98294d35f12cb4bf33bf6c8b94e50e5ffdec04982a308373b282e028f347cd99ff92d1b4f00e96
7
- data.tar.gz: 2748d5fd4e56cffafef5d7ea7ea21fcf9c0b7f3b289ed16a9be73ff590014e7f31ae8f71890a8724851051e09b493d6cd458a79a3eed8442a705c46f4feb14dc
6
+ metadata.gz: a0ed151255f25b758cb3361599b8b0c7d6b3b66e01d817f76d298b2d791acdf647c8d7f83178995b4dd5e76f2ef8117c491090f23b8d01e79dcd5b4000f3aa8e
7
+ data.tar.gz: c1a87ff107bf43d4890c82e6a19669c0d1176db9a8db973f099898958bea1083a16ac0bd3731eceda7644764ce85eb46cf23600235d110102a6cacc764583656
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-pg
2
2
 
3
+ ### v0.25.0 / 2023-05-25
4
+
5
+ * ADDED: Add config[:obfuscation_limit] to pg and mysql2
6
+
3
7
  ### v0.24.0 / 2023-04-17
4
8
 
5
9
  * BREAKING CHANGE: Drop support for EoL Ruby 2.7
@@ -26,6 +26,7 @@ module OpenTelemetry
26
26
 
27
27
  option :peer_service, default: nil, validate: :string
28
28
  option :db_statement, default: :include, validate: %I[omit include obfuscate]
29
+ option :obfuscation_limit, default: 2000, validate: :integer
29
30
 
30
31
  private
31
32
 
@@ -107,8 +107,10 @@ module OpenTelemetry
107
107
  def obfuscate_sql(sql)
108
108
  return sql unless config[:db_statement] == :obfuscate
109
109
 
110
- # Borrowed from opentelemetry-instrumentation-mysql2
111
- return 'SQL query too large to remove sensitive data ...' if sql.size > 2000
110
+ if sql.size > config[:obfuscation_limit]
111
+ truncated_sql = sql[..sql.index(generated_postgres_regex) - 1]
112
+ return truncated_sql + "...\nSQL truncated (> #{config[:obfuscation_limit]} characters)"
113
+ end
112
114
 
113
115
  # From:
114
116
  # https://github.com/newrelic/newrelic-ruby-agent/blob/9787095d4b5b2d8fcaf2fdbd964ed07c731a8b6b/lib/new_relic/agent/database/obfuscator.rb
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module PG
10
- VERSION = '0.24.0'
10
+ VERSION = '0.25.0'
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-pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.25.0
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-04-17 00:00:00.000000000 Z
11
+ date: 2023-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 1.48.1
173
+ version: 1.50.2
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 1.48.1
180
+ version: 1.50.2
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: simplecov
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -243,10 +243,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
243
243
  licenses:
244
244
  - Apache-2.0
245
245
  metadata:
246
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.24.0/file/CHANGELOG.md
246
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.25.0/file/CHANGELOG.md
247
247
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/pg
248
248
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
249
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.24.0
249
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.25.0
250
250
  post_install_message:
251
251
  rdoc_options: []
252
252
  require_paths: