opentelemetry-instrumentation-trilogy 0.59.1 → 0.59.2

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: 1df4ada92030e68e3c0e9f757c6d659286ed0cadc3f66837f2a832f17ad53ba2
4
- data.tar.gz: 47e1e02d207c36d2104d24e1a9ebc1551c31c1e80c3c7ae12d1c9e0db7c9583a
3
+ metadata.gz: 663fb1321f66da30c5c7e408c491f9034198d1a92bde31c998c16e4a466801b1
4
+ data.tar.gz: f662f92333f829ba76ed3c01c4a7e5656fb69eea0332a4f645fcd4728f970ac7
5
5
  SHA512:
6
- metadata.gz: 72679d7b82f83224086e3aa0405de4fb2ff6a25f97a510514949babe97fda97f51de2478ec05b676ed5eca5095b4e7d598745ad32276435ce8015ed1ebb36d18
7
- data.tar.gz: 6da6b91ee971a34a0f6daa0af358e17450687df613f04cd0c8df4dc88d6f8c491a5a51ab35e59a1ed0269f9ccf7c8cdf74de7133ea762ceaf26232618546fcab
6
+ metadata.gz: a5835242ed0972f4e5fde94437cac7a23f9ca2e4110394a6a609565c4052ceef4b1c35f075c1b95d56dd3e5f12b7f29bfca764bda07f3bc3ba8a66e1d69b0a55
7
+ data.tar.gz: 8122b2878a76de0fbdc5371619e94b2ef5bc31282e8a17195938f9e9ddd9ac0bb40ab0b6bbf9c010b48bbdfe27f465458eb336d04ddd9dde0077eeaab15ed4bd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-trilogy
2
2
 
3
+ ### v0.59.2 / 2024-02-20
4
+
5
+ * FIXED: Dup string if frozen in trilogy query
6
+
3
7
  ### v0.59.1 / 2024-02-08
4
8
 
5
9
  * FIXED: Add missing requires for sql-helpers to mysql, pg, and trilogy instrumentation
@@ -7,22 +7,6 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Trilogy
10
- # @api private
11
- class NoopPropagator
12
- EMPTY_LIST = [].freeze
13
- private_constant(:EMPTY_LIST)
14
-
15
- def inject(carrier, context: Context.current, setter: nil); end
16
-
17
- def extract(carrier, context: Context.current, getter: nil)
18
- context
19
- end
20
-
21
- def fields
22
- EMPTY_LIST
23
- end
24
- end
25
-
26
10
  # The Instrumentation class contains logic to detect and install the Trilogy instrumentation
27
11
  class Instrumentation < OpenTelemetry::Instrumentation::Base
28
12
  install do |config|
@@ -61,10 +45,9 @@ module OpenTelemetry
61
45
  propagator = config[:propagator]
62
46
  @propagator = case propagator
63
47
  when 'vitess' then fetch_propagator(propagator, 'OpenTelemetry::Propagator::Vitess')
64
- when 'none', nil then NoopPropagator.new
48
+ when 'none', nil then nil
65
49
  else
66
50
  OpenTelemetry.logger.warn "The #{propagator} propagator is unknown and cannot be configured"
67
- NoopPropagator.new
68
51
  end
69
52
  end
70
53
 
@@ -50,7 +50,14 @@ module OpenTelemetry
50
50
  ),
51
51
  kind: :client
52
52
  ) do |_span, context|
53
- propagator.inject(sql, context: context)
53
+ if propagator && sql.frozen?
54
+ sql = +sql
55
+ propagator.inject(sql, context: context)
56
+ sql.freeze
57
+ elsif propagator
58
+ propagator.inject(sql, context: context)
59
+ end
60
+
54
61
  super(sql)
55
62
  end
56
63
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Trilogy
10
- VERSION = '0.59.1'
10
+ VERSION = '0.59.2'
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.59.1
4
+ version: 0.59.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-08 00:00:00.000000000 Z
11
+ date: 2024-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -317,10 +317,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
317
317
  licenses:
318
318
  - Apache-2.0
319
319
  metadata:
320
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.59.1/file/CHANGELOG.md
320
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.59.2/file/CHANGELOG.md
321
321
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/trilogy
322
322
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
323
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.59.1
323
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.59.2
324
324
  post_install_message:
325
325
  rdoc_options: []
326
326
  require_paths: