opentelemetry-instrumentation-pg 0.22.3 → 0.24.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: e14d3c31673280352523e2c65a63630dd011198b2a5f80050c78498566028731
4
- data.tar.gz: 7d6837fb749ecaa4603eaddbf6b7bf1e984d5da8592789e0dc8e8d2812b098d0
3
+ metadata.gz: f0c59fa49902f08ce89443d4b062b10d31b6e8c6a7741b2069e32c974079c07f
4
+ data.tar.gz: 5530b1f69417c3bbcb9219fba0f5ae34d71741fcac4d496c247bbdb88384fe0c
5
5
  SHA512:
6
- metadata.gz: e0ae9029f10e93984a7e042a1703e5d1516ad8452c3bf3a7e777952309d0a394eacbbf950cee24df15d4bf51ed9b0396c762786fa63a346ed29bf5120d382bc8
7
- data.tar.gz: fa0c955f672a5bc52743f64116a0c2b4f48edec1679d1924d0135db3079c7d4e38350e7aba7ec35bd8e6b5f68a465cdf162d50c9a946376fe60ca846ed1e754b
6
+ metadata.gz: e52b890b4f7008ae18888810e58a5bba899d20877f446467ae98294d35f12cb4bf33bf6c8b94e50e5ffdec04982a308373b282e028f347cd99ff92d1b4f00e96
7
+ data.tar.gz: 2748d5fd4e56cffafef5d7ea7ea21fcf9c0b7f3b289ed16a9be73ff590014e7f31ae8f71890a8724851051e09b493d6cd458a79a3eed8442a705c46f4feb14dc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Release History: opentelemetry-instrumentation-pg
2
2
 
3
+ ### v0.24.0 / 2023-04-17
4
+
5
+ * BREAKING CHANGE: Drop support for EoL Ruby 2.7
6
+
7
+ * ADDED: Drop support for EoL Ruby 2.7
8
+
9
+ ### v0.23.0 / 2023-01-14
10
+
11
+ * BREAKING CHANGE: Removed deprecated instrumentation options
12
+
13
+ * ADDED: Removed deprecated instrumentation options
14
+ * FIXED: Reduce Hash Allocations in PG Instrumentation
15
+ * DOCS: Fix gem homepage
16
+ * DOCS: More gem documentation fixes
17
+
3
18
  ### v0.22.3 / 2022-12-06
4
19
 
5
20
  * FIXED: Use attributes from the active PG connection
@@ -86,7 +86,7 @@ module OpenTelemetry
86
86
  multi_line_comments
87
87
  ].freeze
88
88
 
89
- UNMATCHED_PAIRS_REGEX = %r{'|\/\*|\*\/|\$(?!\?)}.freeze
89
+ UNMATCHED_PAIRS_REGEX = %r{'|\/\*|\*\/|\$(?!\?)}
90
90
 
91
91
  # These are all alike in that they will have a SQL statement as the first parameter.
92
92
  # That statement may possibly be parameterized, but we can still use it - the
@@ -11,23 +11,7 @@ module OpenTelemetry
11
11
  class Instrumentation < OpenTelemetry::Instrumentation::Base
12
12
  MINIMUM_VERSION = Gem::Version.new('1.1.0')
13
13
 
14
- install do |config|
15
- if config[:enable_sql_obfuscation]
16
- config[:db_statement] = :obfuscate
17
- OpenTelemetry.logger.warn(
18
- 'Instrumentation pg configuration option enable_sql_obfuscation has been deprecated,' \
19
- 'use db_statement option instead'
20
- )
21
- end
22
-
23
- unless config[:enable_statement_attribute]
24
- config[:db_statement] = :omit
25
- OpenTelemetry.logger.warn(
26
- 'Instrumentation pg configuration option enable_statement_attribute has been deprecated,' \
27
- 'use db_statement option instead'
28
- )
29
- end
30
-
14
+ install do |_config|
31
15
  require_dependencies
32
16
  patch_client
33
17
  end
@@ -41,8 +25,6 @@ module OpenTelemetry
41
25
  end
42
26
 
43
27
  option :peer_service, default: nil, validate: :string
44
- option :enable_sql_obfuscation, default: false, validate: :boolean
45
- option :enable_statement_attribute, default: true, validate: :boolean
46
28
  option :db_statement, default: :include, validate: %I[omit include obfuscate]
47
29
 
48
30
  private
@@ -86,7 +86,7 @@ module OpenTelemetry
86
86
  attrs = { 'db.operation' => validated_operation(operation), 'db.postgresql.prepared_statement_name' => statement_name }
87
87
  attrs['db.statement'] = sql unless config[:db_statement] == :omit
88
88
  attrs.merge!(OpenTelemetry::Instrumentation::PG.attributes)
89
- attrs.reject! { |_, v| v.nil? }
89
+ attrs.compact!
90
90
 
91
91
  [span_name(operation), client_attributes.merge(attrs)]
92
92
  end
@@ -131,7 +131,9 @@ module OpenTelemetry
131
131
  }
132
132
  attributes['peer.service'] = config[:peer_service] if config[:peer_service]
133
133
 
134
- attributes.merge(transport_attrs).reject { |_, v| v.nil? }
134
+ attributes.merge!(transport_attrs)
135
+ attributes.compact!
136
+ attributes
135
137
  end
136
138
 
137
139
  def transport_addr
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module PG
10
- VERSION = '0.22.3'
10
+ VERSION = '0.24.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.22.3
4
+ version: 0.24.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: 2022-12-06 00:00:00.000000000 Z
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.21.0
33
+ version: 0.22.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.21.0
40
+ version: 0.22.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activerecord
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.17'
75
+ version: '2.4'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.17'
82
+ version: '2.4'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: opentelemetry-test-helpers
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '0.3'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '0.3'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pg
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 1.3.0
173
+ version: 1.48.1
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.3.0
180
+ version: 1.48.1
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: simplecov
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -239,14 +239,14 @@ files:
239
239
  - lib/opentelemetry/instrumentation/pg/lru_cache.rb
240
240
  - lib/opentelemetry/instrumentation/pg/patches/connection.rb
241
241
  - lib/opentelemetry/instrumentation/pg/version.rb
242
- homepage: https://github.com/open-telemetry/opentelemetry-contrib
242
+ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
243
243
  licenses:
244
244
  - Apache-2.0
245
245
  metadata:
246
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-pg/v0.22.3/file.CHANGELOG.html
246
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.24.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://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-pg/v0.22.3
249
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.24.0
250
250
  post_install_message:
251
251
  rdoc_options: []
252
252
  require_paths:
@@ -255,14 +255,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
255
  requirements:
256
256
  - - ">="
257
257
  - !ruby/object:Gem::Version
258
- version: 2.6.0
258
+ version: '3.0'
259
259
  required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  requirements:
261
261
  - - ">="
262
262
  - !ruby/object:Gem::Version
263
263
  version: '0'
264
264
  requirements: []
265
- rubygems_version: 3.1.6
265
+ rubygems_version: 3.2.33
266
266
  signing_key:
267
267
  specification_version: 4
268
268
  summary: PG (PostgreSQL) instrumentation for the OpenTelemetry framework