opentelemetry-instrumentation-trilogy 0.55.1 → 0.56.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: 8cc568f9e1a5d6a330ffddee8c6888fac1c7b1c84433a003cf68673d654e6008
4
- data.tar.gz: ccfa730942e2472d8ad4978ed229d6b1fc44a597ac74331bfe1e17be28fcd4a1
3
+ metadata.gz: 87f006ee60e9b69302f9d4da5945d7cde5a917ea925498b2fe727e1916b8bbff
4
+ data.tar.gz: 938cd875ffd5ae56f97525d01ed4058918dcc3709ae9429546b8132099ef7ec2
5
5
  SHA512:
6
- metadata.gz: e92928d645e72804e3dfc5d10069856585f0d48badf6a8dd2ecabf2c471012222b33d70bc16d247adeee6d0c98196ab53bda948e36aafd23ec898b5fd202050a
7
- data.tar.gz: 72f70ea92bf8f58c0cf767898362724ba6e9c1d73adcdec2a2ffb0ce0f84c6540880b8a9e359e43b06797514b5789f7b0d8db9f98df107ce5db0a655acde46b0
6
+ metadata.gz: 1d14dddca8b736a90197744d35d0bb7c523767b5a5a4ce93fa445b46dfa570b4463636802a8613ded1cebc7c2be44b41f85ee02525fbeb19d7e847cfa007f2d6
7
+ data.tar.gz: cb79931cef883a55c7b356e33fdb7a883a2bedf518edb72cb7179065a9c861383eadc6d0a773971022d28c2aacd78f70560574d4be1be50aeca129aeb4cb1231
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History: opentelemetry-instrumentation-trilogy
2
2
 
3
+ ### v0.56.0 / 2023-06-02
4
+
5
+ * BREAKING CHANGE: Separate logical MySQL host from connected host
6
+
7
+ * ADDED: Separate logical MySQL host from connected host
8
+
3
9
  ### v0.55.1 / 2023-06-01
4
10
 
5
11
  * FIXED: Regex non-match with obfuscation limit (issue #486)
@@ -48,11 +48,6 @@ module OpenTelemetry
48
48
 
49
49
  FULL_SQL_REGEXP = Regexp.union(MYSQL_COMPONENTS.map { |component| COMPONENTS_REGEX_MAP[component] })
50
50
 
51
- def initialize(args)
52
- @_otel_net_peer_name = args[:host]
53
- super
54
- end
55
-
56
51
  def query(sql)
57
52
  tracer.in_span(
58
53
  database_span_name(sql),
@@ -68,11 +63,12 @@ module OpenTelemetry
68
63
  def client_attributes(sql)
69
64
  attributes = {
70
65
  ::OpenTelemetry::SemanticConventions::Trace::DB_SYSTEM => 'mysql',
71
- ::OpenTelemetry::SemanticConventions::Trace::NET_PEER_NAME => net_peer_name
66
+ ::OpenTelemetry::SemanticConventions::Trace::NET_PEER_NAME => connection_options.fetch(:host, 'unknown sock')
72
67
  }
73
68
 
74
69
  attributes[::OpenTelemetry::SemanticConventions::Trace::DB_NAME] = database_name if database_name
75
70
  attributes[::OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE] = config[:peer_service] unless config[:peer_service].nil?
71
+ attributes['db.mysql.instance.address'] = @connected_host if defined?(@connected_host)
76
72
 
77
73
  case config[:db_statement]
78
74
  when :obfuscate
@@ -135,16 +131,6 @@ module OpenTelemetry
135
131
  connection_options[:database]
136
132
  end
137
133
 
138
- def net_peer_name
139
- if defined?(@connected_host)
140
- @connected_host
141
- elsif @_otel_net_peer_name
142
- @_otel_net_peer_name
143
- else
144
- 'unknown sock'
145
- end
146
- end
147
-
148
134
  def tracer
149
135
  Trilogy::Instrumentation.instance.tracer
150
136
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Trilogy
10
- VERSION = '0.55.1'
10
+ VERSION = '0.56.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-trilogy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.55.1
4
+ version: 0.56.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: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -275,10 +275,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
275
275
  licenses:
276
276
  - Apache-2.0
277
277
  metadata:
278
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.55.1/file/CHANGELOG.md
278
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.56.0/file/CHANGELOG.md
279
279
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/trilogy
280
280
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
281
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.55.1
281
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.56.0
282
282
  post_install_message:
283
283
  rdoc_options: []
284
284
  require_paths: