opentelemetry-instrumentation-mysql2 0.10.1 → 0.11.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: 9ca6e1e3d4e22a903ac4656474df1d2cdeb4f2b969dec0316b0727ce3202b978
4
- data.tar.gz: 149b1f3ce6e2fb03b5ef0075b4a18c0d4f79ccedb01fb942a0949090ca0cafc5
3
+ metadata.gz: 343f1b5abb33a678fabe4a1f0d2cb0900841a576bdebc2af3eb853086844e7b8
4
+ data.tar.gz: 326da9138c5abae9a79b6e5447976556b61ded92bd97d15b617eec7f8c3b3c6b
5
5
  SHA512:
6
- metadata.gz: 838626eeb308bc531d7cbc3cf4f56e9b0a8615ae1be0c5bf34e6522a11742a21552b9ae899c3c4e210aff031bc099893f72f48c57f9aff0b1b6d2c2ae1cdbbc6
7
- data.tar.gz: 40e2c7a54593176e32abd1314200c1e43d601aae5169443b0629603a360748c25fab85a675ec41a0f8bfbca12b258abc0dfdfe812ea3ed7bc68fc08e211f9492
6
+ metadata.gz: 209f75a882204378bb3c56844b2f49dc88747fb0437a70d836725000cf384c3e3da78756dca0250ca5840145ce350352760f22eb723cc373d39f7c7518a533c9
7
+ data.tar.gz: 27260bbd464888fb87b3f2fe86751a01f22ed0ebb1eb45b3ecfe22b9e4db802be8cac5d5033bc43a144b241202a9dfeb3fbe19b827ee431d40ec219bd7574d12
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-instrumentation-mysql2
2
2
 
3
+ ### v0.11.0 / 2020-12-11
4
+
5
+ * ADDED: Add peer service config to mysql
6
+ * FIXED: Copyright comments to not reference year
7
+
3
8
  ### v0.10.1 / 2020-12-09
4
9
 
5
10
  * 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 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
- {
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 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.1'
10
+ VERSION = '0.11.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.1
4
+ version: 0.11.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-09 00:00:00.000000000 Z
11
+ date: 2020-12-11 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.11.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.11.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.1/file.CHANGELOG.html
173
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.11.0/file.CHANGELOG.html
174
174
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/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.1
176
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-mysql2/v0.11.0
177
177
  post_install_message:
178
178
  rdoc_options: []
179
179
  require_paths: