opentelemetry-instrumentation-dalli 0.27.1 → 0.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c14fe23e0a1534917dd6572a9c1b1dcdf552d4104d08dd12a476e91bdf48410e
4
- data.tar.gz: 4669f8de144ece633733663da631326d03a3fcbad51ae097b1c81ecab42d7e15
3
+ metadata.gz: 2814b7b110f610a440bd89b48f1f0d8495ee1c2102c265ac7b576e83eb98bcc9
4
+ data.tar.gz: be98ed763f3592fcaf7eccaa291b50b94582020d293d56bb76bfac4404dd3d94
5
5
  SHA512:
6
- metadata.gz: fe1d0dd44f111923049bd2299c29b7199f85f6611a4162777d4206d52e3051fa6d4b392048f34ebea9e3eeef13a52c95c79e706b12c9fa9d6f0544a4053fc295
7
- data.tar.gz: 53a6cff34522ed15f6afd008e2d9d87539501c59f37bc0f93983cd07e82f95961a34fb341d6f2646752607365599bd0cdd72c9f3d03a3e02e730f840327fbf47
6
+ metadata.gz: 3b32cf43c0ed6966dc26df7dd7ed2283827ccc45d359b64a7f1f8501e389f35ff476c9ae58d2cf6d27c9694e94924d049e28cfa8f53d72912c47a13b5a50b72f
7
+ data.tar.gz: 75e43c857534bb0f713940b785c5c46ac5c1f679d7ac8ef0697d546a9f9fd16a9a7ff800e904b8e078b1a084851964b23760779f2aae71a94a12902b8af57a1c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-dalli
2
2
 
3
+ ### v0.27.2 / 2025-04-30
4
+
5
+ * FIXED: Do not pollute the `OpenTelemetry::Instrumentation` namespace
6
+
3
7
  ### v0.27.1 / 2025-04-21
4
8
 
5
9
  * FIXED: Only prepend Dalli patch if binary protocol defined
@@ -6,70 +6,72 @@
6
6
 
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
- # Utility functions
10
- module Utils
11
- extend self
9
+ module Dalli
10
+ # Utility functions
11
+ module Utils
12
+ extend self
12
13
 
13
- STRING_PLACEHOLDER = ''.encode(::Encoding::UTF_8).freeze
14
- CMD_MAX_LEN = 500
14
+ STRING_PLACEHOLDER = ''.encode(::Encoding::UTF_8).freeze
15
+ CMD_MAX_LEN = 500
15
16
 
16
- OPNAME_MAPPING = {
17
- 'get' => 'get',
18
- 'cas' => 'get',
19
- 'set' => 'set',
20
- 'add' => 'add',
21
- 'replace' => 'replace',
22
- 'delete' => 'delete',
23
- 'incr' => 'incr',
24
- 'decr' => 'decr',
25
- 'flush' => 'flush',
26
- 'write_noop' => 'noop',
27
- 'version' => 'version',
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',
36
- 'append' => 'append',
37
- 'prepend' => 'prepend',
38
- 'stats' => 'stat',
39
- 'reset_stats' => 'stat',
40
- 'multi_set' => 'setq',
41
- 'multi_add' => 'addq',
42
- 'multi_replace' => 'replaceq',
43
- 'multi_delete' => 'deleteq',
44
- 'touch' => 'touch',
45
- 'gat' => 'gat'
46
- # 'sasl_authentication' => 'auth_negotiation',
47
- # 'sasl_authentication' => 'auth_request',
48
- }.freeze
17
+ OPNAME_MAPPING = {
18
+ 'get' => 'get',
19
+ 'cas' => 'get',
20
+ 'set' => 'set',
21
+ 'add' => 'add',
22
+ 'replace' => 'replace',
23
+ 'delete' => 'delete',
24
+ 'incr' => 'incr',
25
+ 'decr' => 'decr',
26
+ 'flush' => 'flush',
27
+ 'write_noop' => 'noop',
28
+ 'version' => 'version',
29
+ 'send_multiget' => 'getkq',
30
+ # TODO: add better support for PipelinedGetter
31
+ # In dalli 3.1, multiget has been refactored to use a more robust PipelinedGetter class.
32
+ # The `pipelined_get` method has been introduced to the Dalli::Server to support this new class.
33
+ # If PipelinedGetter makes instrumentation of multi operations easier, we should then migrate
34
+ # instrumentation to Dalli::Client, since it seems to be a more stable chokepoint.
35
+ # For now we're just ensuring we support this new Dalli::Server method.
36
+ 'pipelined_get' => 'getkq',
37
+ 'append' => 'append',
38
+ 'prepend' => 'prepend',
39
+ 'stats' => 'stat',
40
+ 'reset_stats' => 'stat',
41
+ 'multi_set' => 'setq',
42
+ 'multi_add' => 'addq',
43
+ 'multi_replace' => 'replaceq',
44
+ 'multi_delete' => 'deleteq',
45
+ 'touch' => 'touch',
46
+ 'gat' => 'gat'
47
+ # 'sasl_authentication' => 'auth_negotiation',
48
+ # 'sasl_authentication' => 'auth_request',
49
+ }.freeze
49
50
 
50
- def opname(operation, multi)
51
- lookup_name = multi ? "multi_#{operation}" : operation.to_s
52
- OPNAME_MAPPING[lookup_name] || operation.to_s
53
- end
51
+ def opname(operation, multi)
52
+ lookup_name = multi ? "multi_#{operation}" : operation.to_s
53
+ OPNAME_MAPPING[lookup_name] || operation.to_s
54
+ end
54
55
 
55
- def format_command(operation, args)
56
- placeholder = "#{operation} BLOB (OMITTED)"
56
+ def format_command(operation, args)
57
+ placeholder = "#{operation} BLOB (OMITTED)"
57
58
 
58
- command = +operation.to_s
59
- args.flatten.each do |arg|
60
- str = arg.to_s
61
- if str.bytesize >= CMD_MAX_LEN
62
- command << ' BLOB (OMITTED)'
63
- elsif !str.empty?
64
- command << ' ' << str
59
+ command = +operation.to_s
60
+ args.flatten.each do |arg|
61
+ str = arg.to_s
62
+ if str.bytesize >= CMD_MAX_LEN
63
+ command << ' BLOB (OMITTED)'
64
+ elsif !str.empty?
65
+ command << ' ' << str
66
+ end
65
67
  end
66
- end
67
68
 
68
- command = OpenTelemetry::Common::Utilities.utf8_encode(command, binary: true, placeholder: placeholder)
69
- OpenTelemetry::Common::Utilities.truncate(command, CMD_MAX_LEN)
70
- rescue StandardError => e
71
- OpenTelemetry.logger.debug("Error sanitizing Dalli operation: #{e}")
72
- placeholder
69
+ command = OpenTelemetry::Common::Utilities.utf8_encode(command, binary: true, placeholder: placeholder)
70
+ OpenTelemetry::Common::Utilities.truncate(command, CMD_MAX_LEN)
71
+ rescue StandardError => e
72
+ OpenTelemetry.logger.debug("Error sanitizing Dalli operation: #{e}")
73
+ placeholder
74
+ end
73
75
  end
74
76
  end
75
77
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Dalli
10
- VERSION = '0.27.1'
10
+ VERSION = '0.27.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-dalli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.1
4
+ version: 0.27.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: 2025-04-21 00:00:00.000000000 Z
11
+ date: 2025-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -60,10 +60,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
60
60
  licenses:
61
61
  - Apache-2.0
62
62
  metadata:
63
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-dalli/0.27.1/file/CHANGELOG.md
63
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-dalli/0.27.2/file/CHANGELOG.md
64
64
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/dalli
65
65
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
66
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-dalli/0.27.1
66
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-dalli/0.27.2
67
67
  post_install_message:
68
68
  rdoc_options: []
69
69
  require_paths: