opentelemetry-instrumentation-mysql2 0.22.0 → 0.23.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: 139dddefaff180304528b83c6fe468bc16334d8d79b9f3ce3008a341aec4c7fc
4
- data.tar.gz: 22b7924ecb2b9e33404865a13bb755ecfda62ee2e90a5a62fc24df0530a971ac
3
+ metadata.gz: 9ea7871c2d5272a19f91159b2b9f72e07e265fed7dd673c03b3ef2c7506aed62
4
+ data.tar.gz: 49579a5b7030b8fd8e19900158ad8438ed91a2f9188e8d1e4ee2799503f72f4a
5
5
  SHA512:
6
- metadata.gz: b632dd330fd5846e6d500990a8e38629e62b91040ab2f39f1d52d10a145af92076ee4ef6d2e8d10fb5decace8858d02cc070b256212f70cbb6d858bfa062b50a
7
- data.tar.gz: b71616e71765cc3d1fcdb8a987db447e6f58511ef53a491fe7b377746d62880a8e178b93d01d10a6b01c3d7c4d1d955d48fb6e8cdec1b0371ed7b02348c4a47a
6
+ metadata.gz: d762f5106fd527d7f4dfc43830bb6ad7fc46cb7944e8b2468888fe77078c39a3764836149124760c04a8738c9840ec028f34f54899ab5a33dba99b66cadb02d5
7
+ data.tar.gz: 3e55e547de48c4b2132d4a95023627a8d1a96b0a5f7ee38c3bc565548b541c8da8f2f64817cc636b7de830642a931899b47860939e290d3cbcda7e26b244bc06
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Release History: opentelemetry-instrumentation-mysql2
2
2
 
3
+ ### v0.23.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
+ * FIXED: Ensure encoding errors handled during SQL obfuscation for Trilogy
9
+
3
10
  ### v0.22.0 / 2023-01-14
4
11
 
5
12
  * BREAKING CHANGE: Removed deprecated instrumentation options
@@ -54,9 +54,9 @@ module OpenTelemetry
54
54
  attributes = client_attributes
55
55
  case config[:db_statement]
56
56
  when :include
57
- attributes['db.statement'] = sql
57
+ attributes[SemanticConventions::Trace::DB_STATEMENT] = sql
58
58
  when :obfuscate
59
- attributes['db.statement'] = obfuscate_sql(sql)
59
+ attributes[SemanticConventions::Trace::DB_STATEMENT] = obfuscate_sql(sql)
60
60
  end
61
61
  tracer.in_span(
62
62
  database_span_name(sql),
@@ -78,7 +78,8 @@ module OpenTelemetry
78
78
  obfuscated = 'Failed to obfuscate SQL query - quote characters remained after obfuscation' if detect_unmatched_pairs(obfuscated)
79
79
  obfuscated
80
80
  end
81
- rescue StandardError
81
+ rescue StandardError => e
82
+ OpenTelemetry.handle_error(message: 'Failed to obfuscate SQL', exception: e)
82
83
  'OpenTelemetry error: failed to obfuscate sql'
83
84
  end
84
85
 
@@ -102,7 +103,7 @@ module OpenTelemetry
102
103
  when :db_name
103
104
  database_name
104
105
  when :db_operation_and_name
105
- op = OpenTelemetry::Instrumentation::Mysql2.attributes['db.operation']
106
+ op = OpenTelemetry::Instrumentation::Mysql2.attributes[SemanticConventions::Trace::DB_OPERATION]
106
107
  name = database_name
107
108
  if op && name
108
109
  "#{op} #{name}"
@@ -127,12 +128,12 @@ module OpenTelemetry
127
128
  port = query_options[:port].to_s
128
129
 
129
130
  attributes = {
130
- 'db.system' => 'mysql',
131
- 'net.peer.name' => host,
132
- 'net.peer.port' => port
131
+ SemanticConventions::Trace::DB_SYSTEM => 'mysql',
132
+ SemanticConventions::Trace::NET_PEER_NAME => host,
133
+ SemanticConventions::Trace::NET_PEER_PORT => port
133
134
  }
134
- attributes['db.name'] = database_name if database_name
135
- attributes['peer.service'] = config[:peer_service] if config[:peer_service]
135
+ attributes[SemanticConventions::Trace::DB_NAME] = database_name if database_name
136
+ attributes[SemanticConventions::Trace::PEER_SERVICE] = config[:peer_service] if config[:peer_service]
136
137
  attributes
137
138
  end
138
139
 
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Mysql2
10
- VERSION = '0.22.0'
10
+ VERSION = '0.23.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-mysql2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.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-01-14 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: appraisal
43
43
  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: pry
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.41.1
159
+ version: 1.48.1
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.41.1
166
+ version: 1.48.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: simplecov
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -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.22.0/file/CHANGELOG.md
230
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-mysql2/0.23.0/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.22.0
233
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-mysql2/0.23.0
234
234
  post_install_message:
235
235
  rdoc_options: []
236
236
  require_paths:
@@ -239,14 +239,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
239
239
  requirements:
240
240
  - - ">="
241
241
  - !ruby/object:Gem::Version
242
- version: 2.6.0
242
+ version: '3.0'
243
243
  required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  requirements:
245
245
  - - ">="
246
246
  - !ruby/object:Gem::Version
247
247
  version: '0'
248
248
  requirements: []
249
- rubygems_version: 3.1.6
249
+ rubygems_version: 3.2.33
250
250
  signing_key:
251
251
  specification_version: 4
252
252
  summary: Mysql2 instrumentation for the OpenTelemetry framework