opentelemetry-instrumentation-dalli 0.10.0 → 0.15.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 +22 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/opentelemetry-instrumentation-dalli.rb +1 -1
- data/lib/opentelemetry/instrumentation.rb +1 -1
- data/lib/opentelemetry/instrumentation/dalli.rb +2 -1
- data/lib/opentelemetry/instrumentation/dalli/instrumentation.rb +3 -1
- data/lib/opentelemetry/instrumentation/dalli/patches/server.rb +6 -2
- data/lib/opentelemetry/instrumentation/dalli/utils.rb +2 -20
- data/lib/opentelemetry/instrumentation/dalli/version.rb +2 -2
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6c9db5a7422bb49b6c63efd5ea6f0349ccf9f9d04afdaf9fce2af88f22d24bb
|
4
|
+
data.tar.gz: 9ff108724035220879c7ba5b69cdecdf8880eaaaa71ac53fd8ba65d29a300624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b1d2a36a3e4185a4be4280c61620813607d56a3f55f5f2572d1b8d1145198b3ae51507f53c9a8604ff459bf4a9f7ed44b1cffe4dc71495e2bf0e1660c2c0154
|
7
|
+
data.tar.gz: 8c2bead45ee2bf79b72671e8e0abe37ffc352eaea045574ac68beb9636bec65c2f61e20b3d34983cb1e9d8e4a01e3cb11e4acf969c7a6ef9a32abdb4d024ea6e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-dalli
|
2
2
|
|
3
|
+
### v0.15.0 / 2021-02-18
|
4
|
+
|
5
|
+
* ADDED: Add instrumentation config validation
|
6
|
+
|
7
|
+
### v0.14.0 / 2021-02-03
|
8
|
+
|
9
|
+
* (No significant changes)
|
10
|
+
|
11
|
+
### v0.13.0 / 2021-01-29
|
12
|
+
|
13
|
+
* (No significant changes)
|
14
|
+
|
15
|
+
### v0.12.0 / 2020-12-24
|
16
|
+
|
17
|
+
* (No significant changes)
|
18
|
+
|
19
|
+
### v0.11.0 / 2020-12-11
|
20
|
+
|
21
|
+
* ADDED: Add peer service config to dalli
|
22
|
+
* ADDED: Move utf8 encoding to common utils
|
23
|
+
* FIXED: Copyright comments to not reference year
|
24
|
+
|
3
25
|
### v0.10.0 / 2020-12-03
|
4
26
|
|
5
27
|
* (No significant changes)
|
data/LICENSE
CHANGED
@@ -186,7 +186,7 @@
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
187
187
|
identification within third-party archives.
|
188
188
|
|
189
|
-
Copyright
|
189
|
+
Copyright The OpenTelemetry Authors
|
190
190
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
192
192
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ Apache 2.0 license. See [LICENSE][license-github] for more information.
|
|
43
43
|
[dalli-home]: https://github.com/petergoldstein/dalli
|
44
44
|
[bundler-home]: https://bundler.io
|
45
45
|
[repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
|
46
|
-
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/
|
46
|
+
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/LICENSE
|
47
47
|
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
|
48
48
|
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
|
49
49
|
[ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
7
7
|
require 'opentelemetry'
|
8
|
+
require 'opentelemetry/common'
|
8
9
|
|
9
10
|
module OpenTelemetry
|
10
11
|
module Instrumentation
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
@@ -19,6 +19,8 @@ module OpenTelemetry
|
|
19
19
|
defined?(::Dalli)
|
20
20
|
end
|
21
21
|
|
22
|
+
option :peer_service, default: nil, validate: :string
|
23
|
+
|
22
24
|
private
|
23
25
|
|
24
26
|
def require_dependencies
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
@@ -18,7 +18,7 @@ module OpenTelemetry
|
|
18
18
|
'net.peer.name' => hostname,
|
19
19
|
'net.peer.port' => port
|
20
20
|
}
|
21
|
-
|
21
|
+
attributes['peer.service'] = config[:peer_service] if config[:peer_service]
|
22
22
|
tracer.in_span(operation, attributes: attributes, kind: :client) do
|
23
23
|
super
|
24
24
|
end
|
@@ -29,6 +29,10 @@ module OpenTelemetry
|
|
29
29
|
def tracer
|
30
30
|
Dalli::Instrumentation.instance.tracer
|
31
31
|
end
|
32
|
+
|
33
|
+
def config
|
34
|
+
Dalli::Instrumentation.instance.config
|
35
|
+
end
|
32
36
|
end
|
33
37
|
end
|
34
38
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
@@ -47,7 +47,7 @@ module OpenTelemetry
|
|
47
47
|
def format_command(operation, args)
|
48
48
|
placeholder = "#{operation} BLOB (OMITTED)"
|
49
49
|
command = [operation, *args].join(' ').strip
|
50
|
-
command = utf8_encode(command, binary: true, placeholder: placeholder)
|
50
|
+
command = OpenTelemetry::Common::Utilities.utf8_encode(command, binary: true, placeholder: placeholder)
|
51
51
|
truncate(command, CMD_MAX_LEN)
|
52
52
|
rescue StandardError => e
|
53
53
|
OpenTelemetry.logger.debug("Error sanitizing Dalli operation: #{e}")
|
@@ -57,24 +57,6 @@ module OpenTelemetry
|
|
57
57
|
def truncate(string, size)
|
58
58
|
string.size > size ? "#{string[0...size - 3]}..." : string
|
59
59
|
end
|
60
|
-
|
61
|
-
def utf8_encode(str, binary: false, placeholder: STRING_PLACEHOLDER)
|
62
|
-
str = str.to_s
|
63
|
-
|
64
|
-
if binary
|
65
|
-
# This option is useful for "gracefully" displaying binary data that
|
66
|
-
# often contains text such as marshalled objects
|
67
|
-
str.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
|
68
|
-
elsif str.encoding == ::Encoding::UTF_8
|
69
|
-
str
|
70
|
-
else
|
71
|
-
str.encode(::Encoding::UTF_8)
|
72
|
-
end
|
73
|
-
rescue StandardError => e
|
74
|
-
OpenTelemetry.logger.debug("Error encoding string in UTF-8: #{e}")
|
75
|
-
|
76
|
-
placeholder
|
77
|
-
end
|
78
60
|
end
|
79
61
|
end
|
80
62
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
7
7
|
module OpenTelemetry
|
8
8
|
module Instrumentation
|
9
9
|
module Dalli
|
10
|
-
VERSION = '0.
|
10
|
+
VERSION = '0.15.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.
|
4
|
+
version: 0.15.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: 2021-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.15.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: 0.
|
26
|
+
version: 0.15.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: opentelemetry-common
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.15.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.15.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: appraisal
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,10 +186,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
172
186
|
licenses:
|
173
187
|
- Apache-2.0
|
174
188
|
metadata:
|
175
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.
|
176
|
-
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/
|
189
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.15.0/file.CHANGELOG.html
|
190
|
+
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/dalli
|
177
191
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
178
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.
|
192
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.15.0
|
179
193
|
post_install_message:
|
180
194
|
rdoc_options: []
|
181
195
|
require_paths:
|