opentelemetry-instrumentation-dalli 0.7.0 → 0.12.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: 6ca0b67c265bf10907bf69f9ca3ee9c4c81cadb8a848557a2f9a6c95d1c88861
4
- data.tar.gz: 622680de8f05d14d465cbaa17c2712696a89bc88043cb256a88f71f8e3a63b9b
3
+ metadata.gz: 7d19ac3ad75f3a26653be272f8b7e73d00d84b00a12b72329bdc93748fc69d4b
4
+ data.tar.gz: 41f8e004d7db9dac249f4e81ed4202c08b8afeeecb8503c8708b01b6622e7375
5
5
  SHA512:
6
- metadata.gz: '094925bbdb302e706ae5eb01e83cc44fcaa89cb48f24d6f9046201178827540384de903878553e95338274a724ca68f1cf8a883f4a71791c3ef265279f254616'
7
- data.tar.gz: 5c8a0bcaee5868ed69b3154528fca8b2a75903bce122b698148a2bdd2a4cc3b92b842c20ad4da4e137a71de9e8d995948506445abd8fdcfa9dab421f070703f8
6
+ metadata.gz: d1f720b504c922de177df971183a71a9a891cacdaf86ee9890bb4ce9faa0e4b99124af61cac35167d6bc8604c67bfb21d2ba935692860c393555cd3f8d0dfc24
7
+ data.tar.gz: 4c6b963840463ddb8460869386932703bcbd33e3f83272c05f037116caa462ff4293b10cfaadcd03f24546505147913fd99b15ed378aab350ef9102085568e73
@@ -1,5 +1,29 @@
1
1
  # Release History: opentelemetry-instrumentation-dalli
2
2
 
3
+ ### v0.12.0 / 2020-12-24
4
+
5
+ * (No significant changes)
6
+
7
+ ### v0.11.0 / 2020-12-11
8
+
9
+ * ADDED: Add peer service config to dalli
10
+ * ADDED: Move utf8 encoding to common utils
11
+ * FIXED: Copyright comments to not reference year
12
+
13
+ ### v0.10.0 / 2020-12-03
14
+
15
+ * (No significant changes)
16
+
17
+ ### v0.9.0 / 2020-11-27
18
+
19
+ * BREAKING CHANGE: Add timeout for force_flush and shutdown
20
+
21
+ * ADDED: Add timeout for force_flush and shutdown
22
+
23
+ ### v0.8.0 / 2020-10-27
24
+
25
+ * (No significant changes)
26
+
3
27
  ### v0.7.0 / 2020-10-07
4
28
 
5
29
  * DOCS: Standardize toplevel docs structure and readme
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.
@@ -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.7.0'
10
+ VERSION = '0.12.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.7.0
4
+ version: 0.12.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-08 00:00:00.000000000 Z
11
+ date: 2020-12-24 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.7.0
19
+ version: 0.12.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.7.0
26
+ version: 0.12.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.12.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.12.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: appraisal
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -171,7 +185,11 @@ files:
171
185
  homepage: https://github.com/open-telemetry/opentelemetry-ruby
172
186
  licenses:
173
187
  - Apache-2.0
174
- metadata: {}
188
+ metadata:
189
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.12.0/file.CHANGELOG.html
190
+ source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/instrumentation/dalli
191
+ bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
192
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.12.0
175
193
  post_install_message:
176
194
  rdoc_options: []
177
195
  require_paths: