opentelemetry-instrumentation-mysql2 0.20.1 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +2 -2
- data/lib/opentelemetry/instrumentation/mysql2/patches/client.rb +6 -2
- data/lib/opentelemetry/instrumentation/mysql2/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72d506d7b5ea829dc35ee0f90a02a0ed2231b895204016a806e45a9561f4bce1
|
4
|
+
data.tar.gz: 41d0788f8de74f287a736cf4e70fa106d6963391bb5561a82bd48bb2432e1041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13c5fad74e52b3865b6d9366820be142ac778326cd8e6156ad9899b8f3ba92964797bc727fb2504f654ed4cb37c38472496958dfd4647d1b0ef6be55a8834c63
|
7
|
+
data.tar.gz: 13837ce27d7519f1671a74539faa7b9fa13faea8a36bb96b48af806f9b9c8d6f7ce03b7dbb00fb4ab3d4dee120e655457176f1ba001dbba57e8aaa3f7f96c209
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-mysql2
|
2
2
|
|
3
|
+
### v0.21.1 / 2022-10-26
|
4
|
+
|
5
|
+
* FIXED: Handle encoding errors in mysql obfuscation
|
6
|
+
|
7
|
+
### v0.21.0 / 2022-06-09
|
8
|
+
|
9
|
+
* Upgrading Base dependency version
|
10
|
+
* FIXED: Broken test file requirements
|
11
|
+
|
3
12
|
### v0.20.1 / 2022-05-03
|
4
13
|
|
5
14
|
* ADDED: `with_attributes` method for context propagation
|
data/README.md
CHANGED
@@ -55,7 +55,7 @@ end
|
|
55
55
|
|
56
56
|
## Examples
|
57
57
|
|
58
|
-
An example of usage can be seen in [`example/mysql2.rb`](https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/mysql2/example/mysql2.rb).
|
58
|
+
An example of usage can be seen in [`example/mysql2.rb`](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/mysql2/example/mysql2.rb).
|
59
59
|
|
60
60
|
## How can I get involved?
|
61
61
|
|
@@ -70,7 +70,7 @@ The `opentelemetry-instrumentation-mysql2` gem is distributed under the Apache 2
|
|
70
70
|
[mysql2-home]: https://github.com/brianmario/mysql2
|
71
71
|
[bundler-home]: https://bundler.io
|
72
72
|
[repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
|
73
|
-
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/LICENSE
|
73
|
+
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
|
74
74
|
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
|
75
75
|
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
|
76
76
|
[ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
|
@@ -9,7 +9,7 @@ module OpenTelemetry
|
|
9
9
|
module Mysql2
|
10
10
|
module Patches
|
11
11
|
# Module to prepend to Mysql2::Client for instrumentation
|
12
|
-
module Client
|
12
|
+
module Client # rubocop:disable Metrics/ModuleLength
|
13
13
|
QUERY_NAMES = [
|
14
14
|
'set names',
|
15
15
|
'select',
|
@@ -73,10 +73,13 @@ module OpenTelemetry
|
|
73
73
|
if sql.size > 2000
|
74
74
|
'SQL query too large to remove sensitive data ...'
|
75
75
|
else
|
76
|
-
obfuscated =
|
76
|
+
obfuscated = OpenTelemetry::Common::Utilities.utf8_encode(sql, binary: true)
|
77
|
+
obfuscated = obfuscated.gsub(generated_mysql_regex, '?')
|
77
78
|
obfuscated = 'Failed to obfuscate SQL query - quote characters remained after obfuscation' if detect_unmatched_pairs(obfuscated)
|
78
79
|
obfuscated
|
79
80
|
end
|
81
|
+
rescue StandardError
|
82
|
+
'OpenTelemetry error: failed to obfuscate sql'
|
80
83
|
end
|
81
84
|
|
82
85
|
def generated_mysql_regex
|
@@ -142,6 +145,7 @@ module OpenTelemetry
|
|
142
145
|
QUERY_NAME_RE.match(sql) { |match| match[1].downcase } unless sql.nil?
|
143
146
|
rescue StandardError => e
|
144
147
|
OpenTelemetry.logger.debug("Error extracting sql statement type: #{e.message}")
|
148
|
+
nil
|
145
149
|
end
|
146
150
|
end
|
147
151
|
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.
|
4
|
+
version: 0.21.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: 2022-
|
11
|
+
date: 2022-10-26 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.
|
33
|
+
version: 0.21.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.
|
40
|
+
version: 0.21.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: appraisal
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
103
|
+
version: '1.1'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.1'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: opentelemetry-test-helpers
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 1.3.0
|
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:
|
166
|
+
version: 1.3.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: simplecov
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,14 +223,14 @@ files:
|
|
223
223
|
- lib/opentelemetry/instrumentation/mysql2/instrumentation.rb
|
224
224
|
- lib/opentelemetry/instrumentation/mysql2/patches/client.rb
|
225
225
|
- lib/opentelemetry/instrumentation/mysql2/version.rb
|
226
|
-
homepage: https://github.com/open-telemetry/opentelemetry-
|
226
|
+
homepage: https://github.com/open-telemetry/opentelemetry-contrib
|
227
227
|
licenses:
|
228
228
|
- Apache-2.0
|
229
229
|
metadata:
|
230
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.
|
231
|
-
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/mysql2
|
232
|
-
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
233
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.
|
230
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-mysql2/v0.21.1/file.CHANGELOG.html
|
231
|
+
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/mysql2
|
232
|
+
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
233
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-mysql2/v0.21.1
|
234
234
|
post_install_message:
|
235
235
|
rdoc_options: []
|
236
236
|
require_paths:
|
@@ -239,7 +239,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
239
239
|
requirements:
|
240
240
|
- - ">="
|
241
241
|
- !ruby/object:Gem::Version
|
242
|
-
version: 2.
|
242
|
+
version: 2.6.0
|
243
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
244
|
requirements:
|
245
245
|
- - ">="
|