opentelemetry-instrumentation-mysql2 0.10.0 → 0.14.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: 7bebbac9b1ea5517e20d82360653dcffa16380da882aee446f763746e57d159b
4
- data.tar.gz: ff11957c63a8fc81836f23f0fcb777c89809a2c297c6eb5e26cf13ffa0b922bb
3
+ metadata.gz: 33c89d297e9af1a48742f784e6a736cf83dc36cb589e238b1e54b0e5dc4655a4
4
+ data.tar.gz: 7c924db007a234f7c27c6d3c43785eeda43bd562d1b9171974911003cbe92261
5
5
  SHA512:
6
- metadata.gz: 3b7c6eb076744325a03985c0c983ddd7ca99ecf6eeefa364126e7d1f7a72ef8c4cf3fc8ba0d9ddc39ad6f5bed812503feb8987dc6ffaff5b8b34e260b6b7123e
7
- data.tar.gz: ee3ab4586842adcc000fb9bfdd246775cf8f3f752218df3cae123e779868f3154a7b449aa7d0857b229c440d6ebf54a4487ad266df227a4eacfb6a4dd9429986
6
+ metadata.gz: b3f8a5fe27b7287b033d1b44ef01324c2c0a38d4720c0784785d784939be8600ea4d10654ebff1fc52f891f1c782a434f0468ab056c6cda2c830c4d7122c75c2
7
+ data.tar.gz: 55ea655d90536d5f9f03c28082f93a63ff6df108e6972dc667a2bcb55409344566a89e99cc24d9de0483fa768435b8dff0b7ca75f95f7ba8f860eeb2849d933a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Release History: opentelemetry-instrumentation-mysql2
2
2
 
3
+ ### v0.14.0 / 2021-02-03
4
+
5
+ * (No significant changes)
6
+
7
+ ### v0.13.0 / 2021-01-29
8
+
9
+ * (No significant changes)
10
+
11
+ ### v0.12.0 / 2020-12-24
12
+
13
+ * (No significant changes)
14
+
15
+ ### v0.11.0 / 2020-12-11
16
+
17
+ * ADDED: Add peer service config to mysql
18
+ * FIXED: Copyright comments to not reference year
19
+
20
+ ### v0.10.1 / 2020-12-09
21
+
22
+ * FIXED: Semantic conventions db.type -> db.system
23
+
3
24
  ### v0.10.0 / 2020-12-03
4
25
 
5
26
  * (No significant changes)
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 2020 OpenTelemetry Authors
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 2020 OpenTelemetry Authors
3
+ # Copyright The OpenTelemetry Authors
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 OpenTelemetry Authors
3
+ # Copyright The OpenTelemetry Authors
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 OpenTelemetry Authors
3
+ # Copyright The OpenTelemetry Authors
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 OpenTelemetry Authors
3
+ # Copyright The OpenTelemetry Authors
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 OpenTelemetry Authors
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
- {
76
- 'db.type' => 'mysql',
75
+ attributes = {
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 2020 OpenTelemetry Authors
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.0'
10
+ VERSION = '0.14.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.10.0
4
+ version: 0.14.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: 2020-12-03 00:00:00.000000000 Z
11
+ date: 2021-02-03 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.10.0
19
+ version: 0.14.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.10.0
26
+ version: 0.14.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.10.0/file.CHANGELOG.html
174
- source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/instrumentation/mysql2
173
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.14.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.10.0
176
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.14.0
177
177
  post_install_message:
178
178
  rdoc_options: []
179
179
  require_paths: