opentelemetry-instrumentation-dalli 0.19.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/opentelemetry/instrumentation/dalli/instrumentation.rb +6 -2
- data/lib/opentelemetry/instrumentation/dalli/patches/server.rb +7 -2
- data/lib/opentelemetry/instrumentation/dalli/utils.rb +7 -0
- data/lib/opentelemetry/instrumentation/dalli/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71c0594ea7e11a8d6a0ac1ef5a4d605783fe81b71c87dcb8f33b67f56cb221b3
|
4
|
+
data.tar.gz: 976be448e6529b4025dad1ff76dbe03f363b9da8941815a5a10f5b792175013e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33eb692c99e9442f12a090832592edf0af40835c85feea7cf603a2b79f863e64e54c0bcc1bc84f84e2cd24ad168057d781d0799efd85cb057fed9c42a37e98a9
|
7
|
+
data.tar.gz: 0a9c6be5d04016ccfc28d5145cee50e78047f491148c8b3197e5ef8f76b326f296edf5c04bdfb6e1ac8c44c87b0a9bdf6638ed3a319c5baa6ff4c545fcf41c4b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-dalli
|
2
2
|
|
3
|
+
### v0.21.0 / 2022-05-02
|
4
|
+
|
5
|
+
* ADDED: Validate Using Enums
|
6
|
+
|
7
|
+
### v0.20.0 / 2021-12-01
|
8
|
+
|
9
|
+
* ADDED: Add dalli obfuscation for db_statement
|
10
|
+
* FIXED: Resolve Dalli::Server deprecation in 3.0+
|
11
|
+
|
12
|
+
### v0.19.1 / 2021-09-29
|
13
|
+
|
14
|
+
* (No significant changes)
|
15
|
+
|
3
16
|
### v0.19.0 / 2021-08-12
|
4
17
|
|
5
18
|
* ADDED: Add configuration options for dalli
|
@@ -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:
|
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::
|
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
|
-
|
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',
|
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.
|
4
|
+
version: 0.21.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:
|
11
|
+
date: 2022-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: opentelemetry-common
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.19.
|
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.
|
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.
|
47
|
+
version: 0.20.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.
|
54
|
+
version: 0.20.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,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.0
|
117
|
+
version: '1.0'
|
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.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rubocop
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,10 +200,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
200
200
|
licenses:
|
201
201
|
- Apache-2.0
|
202
202
|
metadata:
|
203
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.
|
203
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.21.0/file.CHANGELOG.html
|
204
204
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/dalli
|
205
205
|
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.
|
206
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.21.0
|
207
207
|
post_install_message:
|
208
208
|
rdoc_options: []
|
209
209
|
require_paths:
|