opentelemetry-instrumentation-dalli 0.19.1 → 0.20.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: a03bb39395524af8921632daeed21a0b8f9683051a4c3ce26f828a9b90f218a2
4
- data.tar.gz: 2f71e04fc5e8c8fe70b5cbec2271d27fe1b229e768e246167ab1b7aa2468dbfa
3
+ metadata.gz: adb6533b877bcebab4922d8bbe8f6bb83d2cef7ff703d1b7887da25750088da1
4
+ data.tar.gz: fa04f75d4a15e816aaa64e1dbc27d4bd5f5ffc1d95865b8e6cdf85eaae4e36cc
5
5
  SHA512:
6
- metadata.gz: bab5523d76836212672a88df71a6b880fe4cd001413889d8ad7e6cd5d217b65023c01e854ce4a72a54079e4bc624520499a5fcc8aa34efb8caab7959068d5dcf
7
- data.tar.gz: 0222dc555abaa399a720d5996317a3fd93a09e55d0991164e64d3fc03b99177738576d284cc88aba5efd823f31342b9549101a8f4f24a102dbdccdd9be3fb81c
6
+ metadata.gz: c2669bad540514cb631adc1ec46a22665934daa4ee62e1471eea1825e5855ac3a97112fdf6c56893ba5415d1ead3e9fd4cb17c4e983e0bb25929a7ea861d55be
7
+ data.tar.gz: e0c5e748e0b283ff787d0cd186d12449969a76cd1608cbd3bf252ba9caa52f790cfde31c2711414d28625f042f2328d28ec5c6467d3d5e1921646c53ce2751b0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-instrumentation-dalli
2
2
 
3
+ ### v0.20.0 / 2021-12-01
4
+
5
+ * ADDED: Add dalli obfuscation for db_statement
6
+ * FIXED: Resolve Dalli::Server deprecation in 3.0+
7
+
3
8
  ### v0.19.1 / 2021-09-29
4
9
 
5
10
  * (No significant changes)
@@ -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: ->(opt) { %I[omit include].include?(opt) }
23
+ option :db_statement, default: :include, validate: ->(opt) { %I[omit obfuscate include].include?(opt) }
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::Server.prepend(Patches::Server)
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
- attributes['db.statement'] = Utils.format_command(operation, args) if config[:db_statement] == :include
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
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Dalli
10
- VERSION = '0.19.1'
10
+ VERSION = '0.20.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.19.1
4
+ version: 0.20.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: 2021-09-30 00:00:00.000000000 Z
11
+ date: 2021-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.19.2
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.2
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.18.3
47
+ version: 0.19.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.18.3
54
+ version: 0.19.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
@@ -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.19.1/file.CHANGELOG.html
203
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.20.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.19.1
206
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-dalli/v0.20.0
207
207
  post_install_message:
208
208
  rdoc_options: []
209
209
  require_paths: