opentelemetry-instrumentation-dalli 0.8.0 → 0.13.0

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: d5cc05fab0804afc88e16e8578ec1df013642fccc02bea4b8ae2cf99daabccca
4
- data.tar.gz: 86e741fefa2cb57ea1b63a75776009849eecc13fab0c935fa688bce16dbe9d7a
3
+ metadata.gz: 05477eea1be6a3ff18cc931f344e01cdd445c006fca9e1d9a9053a1b431bb2fd
4
+ data.tar.gz: 247ff441729668f7b4d722934990c4bd1e71c5f5555beb267e1a5c04c555c83d
5
5
  SHA512:
6
- metadata.gz: b3277c789b9d2662b9fdba65c738af73974822841d93f9b954e99e18c0c158d5a3df0c88038717b67485dc0ff42a7318099f1d62a6b64ccca6844bd2d015c9df
7
- data.tar.gz: 487ff36e8e16b76311af95859a33b41427a613059950377009e7424c92fd1088b49e15a5a8ad56c01ccc2c73bbf695d0fea51b2d9480225a9530f7a43af9d807
6
+ metadata.gz: 5074d1e62e6798dd08b14a7999d5316583cd33ed72b9dfbba1bdde5c82434083c729fcd9854b21b711da76284876092d060f9b7f9a547a23f865ba227f71c813
7
+ data.tar.gz: 56ad70d9a52edd2d205529dfefceb20a518de5ef51663d26c15281a6520f54528ee63a2a83d8b06d90099a463d1c5707a3a239ad9a2b941a8e74eb9696e44d47
@@ -1,5 +1,29 @@
1
1
  # Release History: opentelemetry-instrumentation-dalli
2
2
 
3
+ ### v0.13.0 / 2021-01-29
4
+
5
+ * (No significant changes)
6
+
7
+ ### v0.12.0 / 2020-12-24
8
+
9
+ * (No significant changes)
10
+
11
+ ### v0.11.0 / 2020-12-11
12
+
13
+ * ADDED: Add peer service config to dalli
14
+ * ADDED: Move utf8 encoding to common utils
15
+ * FIXED: Copyright comments to not reference year
16
+
17
+ ### v0.10.0 / 2020-12-03
18
+
19
+ * (No significant changes)
20
+
21
+ ### v0.9.0 / 2020-11-27
22
+
23
+ * BREAKING CHANGE: Add timeout for force_flush and shutdown
24
+
25
+ * ADDED: Add timeout for force_flush and shutdown
26
+
3
27
  ### v0.8.0 / 2020-10-27
4
28
 
5
29
  * (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 2020 OpenTelemetry Authors
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/master/LICENSE
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,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 OpenTelemetry Authors
3
+ # Copyright The OpenTelemetry Authors
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 OpenTelemetry Authors
3
+ # Copyright The OpenTelemetry Authors
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 OpenTelemetry Authors
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 2020 OpenTelemetry Authors
3
+ # Copyright The OpenTelemetry Authors
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 OpenTelemetry Authors
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 2020 OpenTelemetry Authors
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 2020 OpenTelemetry Authors
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.8.0'
10
+ VERSION = '0.13.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.8.0
4
+ version: 0.13.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: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2021-01-30 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.8.0
19
+ version: 0.13.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.8.0
26
+ version: 0.13.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.13.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.13.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.8.0/file.CHANGELOG.html
176
- source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/instrumentation/dalli
189
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.13.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.8.0
192
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.13.0
179
193
  post_install_message:
180
194
  rdoc_options: []
181
195
  require_paths: