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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2814b7b110f610a440bd89b48f1f0d8495ee1c2102c265ac7b576e83eb98bcc9
|
4
|
+
data.tar.gz: be98ed763f3592fcaf7eccaa291b50b94582020d293d56bb76bfac4404dd3d94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b32cf43c0ed6966dc26df7dd7ed2283827ccc45d359b64a7f1f8501e389f35ff476c9ae58d2cf6d27c9694e94924d049e28cfa8f53d72912c47a13b5a50b72f
|
7
|
+
data.tar.gz: 75e43c857534bb0f713940b785c5c46ac5c1f679d7ac8ef0697d546a9f9fd16a9a7ff800e904b8e078b1a084851964b23760779f2aae71a94a12902b8af57a1c
|
data/CHANGELOG.md
CHANGED
@@ -6,70 +6,72 @@
|
|
6
6
|
|
7
7
|
module OpenTelemetry
|
8
8
|
module Instrumentation
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
module Dalli
|
10
|
+
# Utility functions
|
11
|
+
module Utils
|
12
|
+
extend self
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
STRING_PLACEHOLDER = ''.encode(::Encoding::UTF_8).freeze
|
15
|
+
CMD_MAX_LEN = 500
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
|
-
|
56
|
-
|
56
|
+
def format_command(operation, args)
|
57
|
+
placeholder = "#{operation} BLOB (OMITTED)"
|
57
58
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
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
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
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
|
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.
|
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-
|
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.
|
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.
|
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:
|