opentelemetry-helpers-mysql 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -2
- data/README.md +1 -1
- data/lib/opentelemetry/helpers/mysql/version.rb +1 -1
- data/lib/opentelemetry/helpers/mysql.rb +5 -3
- metadata +6 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35a3692a554b75d3c3f77984f3a89cffc6eb40a265204e6c43b0baaf347c3a96
|
|
4
|
+
data.tar.gz: 3520b64c00ad6e95cceb8e91f5205f846c2ed683560066147eb7df95f65e89cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4b37f0a30f25c66926675c41743e69be7c2d69bb7e20420a4a9ccbf6ec1b2f8136ad088fb57d8d42f4290ba342056d47dae1f1c7ee29d473b0ad9d7667de049
|
|
7
|
+
data.tar.gz: 4a722436fa2227a8f94271a039f5ffd9c57963895b6385c3961acc93c7fdfe00c89f798cd7916ed98d7bea261e4c8ffb8ae4968e2e4b4ed289c30392369b5a10
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
# Release History: opentelemetry-helpers-mysql
|
|
1
|
+
# Release History: opentelemetry-helpers-mysql
|
|
2
|
+
|
|
3
|
+
### v0.5.0 / 2026-03-17
|
|
4
|
+
|
|
5
|
+
* ADDED: Optimize extract_statement_type regex and encoding in helpers-mysql (#2088)
|
|
6
|
+
|
|
7
|
+
### v0.4.0 / 2025-10-22
|
|
8
|
+
|
|
9
|
+
* BREAKING CHANGE: Min Ruby Version 3.2
|
|
10
|
+
* ADDED: Min Ruby Version 3.2
|
|
2
11
|
|
|
3
12
|
### v0.3.0 / 2025-09-30
|
|
4
13
|
|
|
@@ -7,7 +16,6 @@
|
|
|
7
16
|
### v0.2.0 / 2025-01-16
|
|
8
17
|
|
|
9
18
|
* BREAKING CHANGE: Set minimum supported version to Ruby 3.1
|
|
10
|
-
|
|
11
19
|
* ADDED: Set minimum supported version to Ruby 3.1
|
|
12
20
|
|
|
13
21
|
### v0.1.2 / 2024-11-26
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenTelemetry Instrumentation Helpers: MySQL
|
|
2
2
|
|
|
3
|
-
This Ruby gem contains logic shared among MySQL adapter libraries, such as mysql2 and trilogy. It's intended for use by
|
|
3
|
+
This Ruby gem contains logic shared among MySQL adapter libraries, such as mysql2 and trilogy. It's intended for use by gem authors instrumenting MySQL adapter libraries.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -42,7 +42,7 @@ module OpenTelemetry
|
|
|
42
42
|
# Ignore query names that might appear in comments prepended to the
|
|
43
43
|
# statement.
|
|
44
44
|
PREPENDED_COMMENTS_REGEX = %r{(?:\/\*.*?\*\/)}m
|
|
45
|
-
QUERY_NAME_REGEX = Regexp.new("^\s*(?:#{PREPENDED_COMMENTS_REGEX})?\s*\\b(#{QUERY_NAMES.join('|')})\\b
|
|
45
|
+
QUERY_NAME_REGEX = Regexp.new("^\s*(?:#{PREPENDED_COMMENTS_REGEX})?\s*\\b(#{QUERY_NAMES.join('|')})\\b", Regexp::IGNORECASE)
|
|
46
46
|
|
|
47
47
|
# This is a span naming utility intended for use in MySQL database
|
|
48
48
|
# adapter instrumentation.
|
|
@@ -68,9 +68,11 @@ module OpenTelemetry
|
|
|
68
68
|
|
|
69
69
|
# @api private
|
|
70
70
|
def extract_statement_type(sql)
|
|
71
|
-
|
|
71
|
+
return unless sql
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
sql = OpenTelemetry::Common::Utilities.utf8_encode(sql, binary: true) unless sql.encoding == ::Encoding::UTF_8 && sql.valid_encoding?
|
|
74
|
+
|
|
75
|
+
QUERY_NAME_REGEX.match(sql) { |match| match[1].downcase }
|
|
74
76
|
rescue StandardError => e
|
|
75
77
|
OpenTelemetry.handle_error(message: 'Error extracting SQL statement type', exception: e)
|
|
76
78
|
nil
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opentelemetry-helpers-mysql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenTelemetry Authors
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: opentelemetry-api
|
|
@@ -57,10 +56,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
|
57
56
|
licenses:
|
|
58
57
|
- Apache-2.0
|
|
59
58
|
metadata:
|
|
60
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-helpers-mysql/0.
|
|
59
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-helpers-mysql/0.5.0/file/CHANGELOG.md
|
|
61
60
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/helpers/mysql
|
|
62
61
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
|
63
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-helpers-mysql/0.
|
|
62
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-helpers-mysql/0.5.0
|
|
64
63
|
post_install_message: ''
|
|
65
64
|
rdoc_options: []
|
|
66
65
|
require_paths:
|
|
@@ -69,15 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
69
68
|
requirements:
|
|
70
69
|
- - ">="
|
|
71
70
|
- !ruby/object:Gem::Version
|
|
72
|
-
version: '3.
|
|
71
|
+
version: '3.2'
|
|
73
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
73
|
requirements:
|
|
75
74
|
- - ">="
|
|
76
75
|
- !ruby/object:Gem::Version
|
|
77
76
|
version: '0'
|
|
78
77
|
requirements: []
|
|
79
|
-
rubygems_version:
|
|
80
|
-
signing_key:
|
|
78
|
+
rubygems_version: 4.0.3
|
|
81
79
|
specification_version: 4
|
|
82
80
|
summary: MySQL Instrumentation Helpers for the OpenTelemetry framework
|
|
83
81
|
test_files: []
|