opentelemetry-instrumentation-dalli 0.19.1 → 0.22.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: a03bb39395524af8921632daeed21a0b8f9683051a4c3ce26f828a9b90f218a2
4
- data.tar.gz: 2f71e04fc5e8c8fe70b5cbec2271d27fe1b229e768e246167ab1b7aa2468dbfa
3
+ metadata.gz: c7db76142dadc45f67291aee6d863f69f852043d2fa2f8f41243f339f5ccef77
4
+ data.tar.gz: d592877e112281e939d18d3b89e819142a48d5fd1a389946bb65079499760db4
5
5
  SHA512:
6
- metadata.gz: bab5523d76836212672a88df71a6b880fe4cd001413889d8ad7e6cd5d217b65023c01e854ce4a72a54079e4bc624520499a5fcc8aa34efb8caab7959068d5dcf
7
- data.tar.gz: 0222dc555abaa399a720d5996317a3fd93a09e55d0991164e64d3fc03b99177738576d284cc88aba5efd823f31342b9549101a8f4f24a102dbdccdd9be3fb81c
6
+ metadata.gz: 7f7a666b3a4cda1882e36c9de578192729c4345639c7ac9e3cdcf14dd2da33f39d62a4ba84f39738600b62e7a061d0cd661f17fefdab25d93c4623315873db33
7
+ data.tar.gz: 742b4191641ef4acceee51ba9eda176b61f9980f05acd375416c7ddb4fca3b3083be30b7a951189315b58820c88d4e29f2054c702aabf75a5b0f02c5c05d9a5b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Release History: opentelemetry-instrumentation-dalli
2
2
 
3
+ ### v0.22.0 / 2022-06-09
4
+
5
+ * Upgrading Base dependency version
6
+ * FIXED: Broken test file requirements
7
+
8
+ ### v0.21.0 / 2022-05-02
9
+
10
+ * ADDED: Validate Using Enums
11
+
12
+ ### v0.20.0 / 2021-12-01
13
+
14
+ * ADDED: Add dalli obfuscation for db_statement
15
+ * FIXED: Resolve Dalli::Server deprecation in 3.0+
16
+
3
17
  ### v0.19.1 / 2021-09-29
4
18
 
5
19
  * (No significant changes)
@@ -20,7 +20,7 @@ module OpenTelemetry
20
20
  end
21
21
 
22
22
  option :peer_service, default: nil, validate: :string
23
- option :db_statement, default: :include, validate: ->(opt) { %I[omit include].include?(opt) }
23
+ option :db_statement, default: :include, validate: %I[omit obfuscate include]
24
24
 
25
25
  private
26
26
 
@@ -30,7 +30,11 @@ module OpenTelemetry
30
30
  end
31
31
 
32
32
  def add_patches
33
- ::Dalli::Server.prepend(Patches::Server)
33
+ if Gem::Version.new(::Dalli::VERSION) < Gem::Version.new('3.0.0')
34
+ ::Dalli::Server.prepend(Patches::Server)
35
+ else
36
+ ::Dalli::Protocol::Binary.prepend(Patches::Server)
37
+ end
34
38
  end
35
39
  end
36
40
  end
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Dalli
10
10
  module Patches
11
- # Module to prepend to Dalli::Server for instrumentation
11
+ # Module to prepend to Dalli::Server (or Dalli::Protocol::Binary in 3.0+) for instrumentation
12
12
  module Server
13
13
  def request(op, *args)
14
14
  operation = Utils.opname(op, multi?)
@@ -17,7 +17,12 @@ module OpenTelemetry
17
17
  'net.peer.name' => hostname,
18
18
  'net.peer.port' => port
19
19
  }
20
- attributes['db.statement'] = Utils.format_command(operation, args) if config[:db_statement] == :include
20
+ if config[:db_statement] == :include
21
+ attributes['db.statement'] = Utils.format_command(operation, args)
22
+ elsif config[:db_statement] == :obfuscate
23
+ attributes['db.statement'] = "#{operation} ?"
24
+ end
25
+
21
26
  attributes['peer.service'] = config[:peer_service] if config[:peer_service]
22
27
  tracer.in_span(operation, attributes: attributes, kind: :client) do
23
28
  super
@@ -26,6 +26,13 @@ module OpenTelemetry
26
26
  'write_noop' => 'noop',
27
27
  'version' => 'version',
28
28
  'send_multiget' => 'getkq',
29
+ # TODO: add better support for PipelinedGetter
30
+ # In dalli 3.1, multiget has been refactored to use a more robust PipelinedGetter class.
31
+ # The `pipelined_get` method has been introduced to the Dalli::Server to support this new class.
32
+ # If PipelinedGetter makes instrumentation of multi operations easier, we should then migrate
33
+ # instrumentation to Dalli::Client, since it seems to be a more stable chokepoint.
34
+ # For now we're just ensuring we support this new Dalli::Server method.
35
+ 'pipelined_get' => 'getkq',
29
36
  'append' => 'append',
30
37
  'prepend' => 'prepend',
31
38
  'stats' => 'stat',
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Dalli
10
- VERSION = '0.19.1'
10
+ VERSION = '0.22.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-dalli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.22.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: 2021-09-30 00:00:00.000000000 Z
11
+ date: 2022-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.19.2
33
+ version: 0.19.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.19.2
40
+ version: 0.19.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: opentelemetry-instrumentation-base
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.18.3
47
+ version: 0.21.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.18.3
54
+ version: 0.21.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: appraisal
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -84,14 +84,14 @@ dependencies:
84
84
  name: dalli
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '2.7'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '2.7'
97
97
  - !ruby/object:Gem::Dependency
@@ -114,14 +114,28 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.0'
117
+ version: '1.1'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '1.0'
124
+ version: '1.1'
125
+ - !ruby/object:Gem::Dependency
126
+ name: opentelemetry-test-helpers
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: rubocop
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -200,10 +214,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
200
214
  licenses:
201
215
  - Apache-2.0
202
216
  metadata:
203
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.19.1/file.CHANGELOG.html
217
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.22.0/file.CHANGELOG.html
204
218
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/dalli
205
219
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
206
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.19.1
220
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.22.0
207
221
  post_install_message:
208
222
  rdoc_options: []
209
223
  require_paths:
@@ -212,7 +226,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
212
226
  requirements:
213
227
  - - ">="
214
228
  - !ruby/object:Gem::Version
215
- version: 2.5.0
229
+ version: 2.6.0
216
230
  required_rubygems_version: !ruby/object:Gem::Requirement
217
231
  requirements:
218
232
  - - ">="