opentelemetry-instrumentation-pg 0.19.2 → 0.20.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: af97ae3e034bdbaf786cc36bca5bea76d4d559bdfca4681c619c21d44925caf8
4
- data.tar.gz: 16a7437169927314555953895ee94fb911aac22921e84e9f7963ddaf6e867fd9
3
+ metadata.gz: 232a15b9a59e026e92b29603101ddf600b8acbc9b6bb4a39dcb129baa15b8cff
4
+ data.tar.gz: 8cd91ba114edb2bcedb7d9a3e6b75556a3ccdc758ce63f85d5478a501b6b6679
5
5
  SHA512:
6
- metadata.gz: 54e1dcb374d7f00093322497835d2aee858b0de0e9f9dd3b0d5645d03aaa151402f68f9dfac3bddd1c16a2813354b7d7855435d075c58ce5dcd075e27b457682
7
- data.tar.gz: 5cd93c0b31cdf8ce8dd9641cb8ea42b5d9f0c86b82202d216527896cb9ea9a78ba4bb9f3386d5cc008116a02fcb6f9f2caf22aab0995c35b48d0f23dbbdd3199
6
+ metadata.gz: 57cd77da534e7e6ddb7f0d7f01ccada4fb50e104962562f4b8f7459e96c8a0c7a1d69ca11bbf28ec93953351a57a71a21b69ccae31e7dbd7e549fc8d68c490b2
7
+ data.tar.gz: 7ce61a7499c0a29322a7c27fd86cfdb62806680817ee90dce52480a7417000502875cd88f8b95e97d8c0d858c883c9025268ce8b4f7517f0ea7128c35d056d63
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History: opentelemetry-instrumentation-pg
2
2
 
3
+ ### v0.20.0 / 2022-05-02
4
+
5
+ * ADDED: Validate Using Enums
6
+ * FIXED: Update pg instrumentation to handle non primitive argument
7
+ * FIXED: RubyGems Fallback
8
+
3
9
  ### v0.19.2 / 2021-12-02
4
10
 
5
11
  * (No significant changes)
@@ -37,16 +37,20 @@ module OpenTelemetry
37
37
  end
38
38
 
39
39
  compatible do
40
- Gem.loaded_specs['pg'].version > Gem::Version.new(MINIMUM_VERSION)
40
+ gem_version > Gem::Version.new(MINIMUM_VERSION)
41
41
  end
42
42
 
43
43
  option :peer_service, default: nil, validate: :string
44
44
  option :enable_sql_obfuscation, default: false, validate: :boolean
45
45
  option :enable_statement_attribute, default: true, validate: :boolean
46
- option :db_statement, default: :include, validate: ->(opt) { %I[omit include obfuscate].include?(opt) }
46
+ option :db_statement, default: :include, validate: %I[omit include obfuscate]
47
47
 
48
48
  private
49
49
 
50
+ def gem_version
51
+ Gem::Version.new(::PG::VERSION)
52
+ end
53
+
50
54
  def require_dependencies
51
55
  require_relative 'patches/connection'
52
56
  end
@@ -69,12 +69,12 @@ module OpenTelemetry
69
69
  def span_attrs(kind, *args) # rubocop:disable Metrics/AbcSize
70
70
  if kind == :query
71
71
  operation = extract_operation(args[0])
72
- sql = obfuscate_sql(args[0])
72
+ sql = obfuscate_sql(args[0]).to_s
73
73
  else
74
74
  statement_name = args[0]
75
75
 
76
76
  if kind == :prepare
77
- sql = obfuscate_sql(args[1])
77
+ sql = obfuscate_sql(args[1]).to_s
78
78
  lru_cache[statement_name] = sql
79
79
  operation = 'PREPARE'
80
80
  else
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module PG
10
- VERSION = '0.19.2'
10
+ VERSION = '0.20.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.19.2
4
+ version: 0.20.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: 2021-12-02 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -30,14 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.19.0
33
+ version: 0.20.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.19.0
40
+ version: 0.20.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: activerecord
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: appraisal
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -215,10 +229,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
215
229
  licenses:
216
230
  - Apache-2.0
217
231
  metadata:
218
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-pg/v0.19.2/file.CHANGELOG.html
232
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-pg/v0.20.0/file.CHANGELOG.html
219
233
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/pg
220
234
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
221
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-pg/v0.19.2
235
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-pg/v0.20.0
222
236
  post_install_message:
223
237
  rdoc_options: []
224
238
  require_paths: