opentelemetry-instrumentation-mysql2 0.10.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/LICENSE +1 -1
- data/lib/opentelemetry-instrumentation-mysql2.rb +1 -1
- data/lib/opentelemetry/instrumentation.rb +1 -1
- data/lib/opentelemetry/instrumentation/mysql2.rb +1 -1
- data/lib/opentelemetry/instrumentation/mysql2/instrumentation.rb +3 -1
- data/lib/opentelemetry/instrumentation/mysql2/patches/client.rb +8 -2
- data/lib/opentelemetry/instrumentation/mysql2/version.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12b400ad2f7611c8d44e1c6dd14083fcedeb4f730cb2fbf19259abc59c15d564
|
4
|
+
data.tar.gz: cf2687053add9de9805c7b8e8416cd9c99a44a4b461c540335b8616329f30623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44e78341f4f54a7ea84225980b55d5d50b913c7640660158b703070e1f6ab936923552858eef9ba8e26c1813bf36c4015e89abd60c31b8d349e2e65f99502a92
|
7
|
+
data.tar.gz: efcc6c0a2049ceaffd32153439102c8eab5e5c8cce13fa27fce1bb0aa11ab37ec6eb7b0dcbe87c729b40178586839b9a6a60ccd17daeccc594aec47d94e41d47
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-mysql2
|
2
2
|
|
3
|
+
### v0.15.0 / 2021-02-18
|
4
|
+
|
5
|
+
* ADDED: Add instrumentation config validation
|
6
|
+
|
7
|
+
### v0.14.0 / 2021-02-03
|
8
|
+
|
9
|
+
* (No significant changes)
|
10
|
+
|
11
|
+
### v0.13.0 / 2021-01-29
|
12
|
+
|
13
|
+
* (No significant changes)
|
14
|
+
|
15
|
+
### v0.12.0 / 2020-12-24
|
16
|
+
|
17
|
+
* (No significant changes)
|
18
|
+
|
19
|
+
### v0.11.0 / 2020-12-11
|
20
|
+
|
21
|
+
* ADDED: Add peer service config to mysql
|
22
|
+
* FIXED: Copyright comments to not reference year
|
23
|
+
|
3
24
|
### v0.10.1 / 2020-12-09
|
4
25
|
|
5
26
|
* FIXED: Semantic conventions db.type -> db.system
|
data/LICENSE
CHANGED
@@ -186,7 +186,7 @@
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
187
187
|
identification within third-party archives.
|
188
188
|
|
189
|
-
Copyright
|
189
|
+
Copyright The OpenTelemetry Authors
|
190
190
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
192
192
|
you may not use this file except in compliance with the License.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
@@ -19,6 +19,8 @@ module OpenTelemetry
|
|
19
19
|
defined?(::Mysql2)
|
20
20
|
end
|
21
21
|
|
22
|
+
option :peer_service, default: nil, validate: :string
|
23
|
+
|
22
24
|
private
|
23
25
|
|
24
26
|
def require_dependencies
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
@@ -72,19 +72,25 @@ module OpenTelemetry
|
|
72
72
|
host = (query_options[:host] || query_options[:hostname]).to_s
|
73
73
|
port = query_options[:port].to_s
|
74
74
|
|
75
|
-
{
|
75
|
+
attributes = {
|
76
76
|
'db.system' => 'mysql',
|
77
77
|
'db.instance' => database_name,
|
78
78
|
'db.url' => "mysql://#{host}:#{port}",
|
79
79
|
'net.peer.name' => host,
|
80
80
|
'net.peer.port' => port
|
81
81
|
}
|
82
|
+
attributes['peer.service'] = config[:peer_service] if config[:peer_service]
|
83
|
+
attributes
|
82
84
|
end
|
83
85
|
|
84
86
|
def tracer
|
85
87
|
Mysql2::Instrumentation.instance.tracer
|
86
88
|
end
|
87
89
|
|
90
|
+
def config
|
91
|
+
Mysql2::Instrumentation.instance.config
|
92
|
+
end
|
93
|
+
|
88
94
|
def extract_statement_type(sql)
|
89
95
|
QUERY_NAME_RE.match(sql) { |match| match[1].downcase } unless sql.nil?
|
90
96
|
rescue StandardError => e
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
7
7
|
module OpenTelemetry
|
8
8
|
module Instrumentation
|
9
9
|
module Mysql2
|
10
|
-
VERSION = '0.
|
10
|
+
VERSION = '0.15.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.
|
4
|
+
version: 0.15.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:
|
11
|
+
date: 2021-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.15.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.15.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: appraisal
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,10 +170,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
170
170
|
licenses:
|
171
171
|
- Apache-2.0
|
172
172
|
metadata:
|
173
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.
|
174
|
-
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/
|
173
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.15.0/file.CHANGELOG.html
|
174
|
+
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/mysql2
|
175
175
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
176
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.
|
176
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.15.0
|
177
177
|
post_install_message:
|
178
178
|
rdoc_options: []
|
179
179
|
require_paths:
|