opentelemetry-instrumentation-dalli 0.22.0 → 0.22.1

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: c7db76142dadc45f67291aee6d863f69f852043d2fa2f8f41243f339f5ccef77
4
- data.tar.gz: d592877e112281e939d18d3b89e819142a48d5fd1a389946bb65079499760db4
3
+ metadata.gz: 241bf85a863e4ddc2382d502a348fad2eec6eaf83a27c57e7da8daf9ff5012a2
4
+ data.tar.gz: c3b15aa63991b01313b12194dd0e2556cdb3b97211cff940177ff32622575d34
5
5
  SHA512:
6
- metadata.gz: 7f7a666b3a4cda1882e36c9de578192729c4345639c7ac9e3cdcf14dd2da33f39d62a4ba84f39738600b62e7a061d0cd661f17fefdab25d93c4623315873db33
7
- data.tar.gz: 742b4191641ef4acceee51ba9eda176b61f9980f05acd375416c7ddb4fca3b3083be30b7a951189315b58820c88d4e29f2054c702aabf75a5b0f02c5c05d9a5b
6
+ metadata.gz: 0d6b5e4c4772152e8f1684a6dad7e306572a65248f55f9b126c9c78521ae03904ba916a677ad66c5adb4a925191d7c7b96b18708c862ecb6b0a5c2dbb7457ac2
7
+ data.tar.gz: ac0646b81b28d7b426a4f157590a7b25d0db47d3d4862762f7bf809bd136deaa1fbf89f2458e50f8547cafef034263ad2bd917e79af8fce2f001e52ebe2a67c3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-dalli
2
2
 
3
+ ### v0.22.1 / 2022-11-28
4
+
5
+ * FIXED: `format_command`'s terrible performance
6
+
3
7
  ### v0.22.0 / 2022-06-09
4
8
 
5
9
  * Upgrading Base dependency version
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/main/LICENSE
46
+ [license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/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
  [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
@@ -10,7 +10,7 @@ module OpenTelemetry
10
10
  module Patches
11
11
  # Module to prepend to Dalli::Server (or Dalli::Protocol::Binary in 3.0+) for instrumentation
12
12
  module Server
13
- def request(op, *args)
13
+ def request(op, *args) # rubocop:disable Naming/MethodParameterName
14
14
  operation = Utils.opname(op, multi?)
15
15
  attributes = {
16
16
  'db.system' => 'memcached',
@@ -53,7 +53,17 @@ module OpenTelemetry
53
53
 
54
54
  def format_command(operation, args)
55
55
  placeholder = "#{operation} BLOB (OMITTED)"
56
- command = [operation, *args].join(' ').strip
56
+
57
+ command = +operation.to_s
58
+ args.flatten.each do |arg|
59
+ str = arg.to_s
60
+ if str.bytesize >= CMD_MAX_LEN
61
+ command << ' BLOB (OMITTED)'
62
+ elsif !str.empty?
63
+ command << ' ' << str
64
+ end
65
+ end
66
+
57
67
  command = OpenTelemetry::Common::Utilities.utf8_encode(command, binary: true, placeholder: placeholder)
58
68
  OpenTelemetry::Common::Utilities.truncate(command, CMD_MAX_LEN)
59
69
  rescue StandardError => e
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Dalli
10
- VERSION = '0.22.0'
10
+ VERSION = '0.22.1'
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.22.0
4
+ version: 0.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-09 00:00:00.000000000 Z
11
+ date: 2022-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.73.0
145
+ version: 1.3.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.73.0
152
+ version: 1.3.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -210,14 +210,14 @@ files:
210
210
  - lib/opentelemetry/instrumentation/dalli/patches/server.rb
211
211
  - lib/opentelemetry/instrumentation/dalli/utils.rb
212
212
  - lib/opentelemetry/instrumentation/dalli/version.rb
213
- homepage: https://github.com/open-telemetry/opentelemetry-ruby
213
+ homepage: https://github.com/open-telemetry/opentelemetry-contrib
214
214
  licenses:
215
215
  - Apache-2.0
216
216
  metadata:
217
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.22.0/file.CHANGELOG.html
218
- source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/dalli
219
- bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
220
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.22.0
217
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-dalli/v0.22.1/file.CHANGELOG.html
218
+ source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/dalli
219
+ bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
220
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-dalli/v0.22.1
221
221
  post_install_message:
222
222
  rdoc_options: []
223
223
  require_paths: