opentelemetry-instrumentation-redis 0.21.1 → 0.22.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: ce59915631b4057f1b6c69b9faec92c2a9afa40260c3332c53006b82d2d85438
4
- data.tar.gz: 22cde24339c23d879768c39bd7ddf7f473ba395472d391b77e1fb3297a102b5f
3
+ metadata.gz: 4a33c472d6172a70e079b09ca58e340541e41cd03bd0b094dbc97d752bb5931f
4
+ data.tar.gz: 57120d158754a6b4285922be18a550bf56559d71c10c9497abb1347a205b5a9f
5
5
  SHA512:
6
- metadata.gz: 5f4ee78dc5643b5078cbe89eef588d4814c8265001b51f04b8fe7d150bcd37fbdc0add788d858610348f3aaa5c87e66b1ad5fd8139f9878e2ad68e52d04e3d7d
7
- data.tar.gz: e7c732d1e5083df3cdb2a541f1039486d0c15f2f3f9ac328fe3fd40e50108bb4d68f08c0034c6a57ffc1a502f986bcf3342018fe9342ea6f4affda2dbfa310ff
6
+ metadata.gz: 4fdbfd22cb02c38ae3896847e220a888da7297290348bd45389813eb282239ce4a9539993495c8cd4de77491f9858f4eaf5f6da8af9944dd812de72b2926c2ad
7
+ data.tar.gz: 4a1da8c573db60a787c23de5fc1c755fc24a275e557dc73a0c31a67f104e457f901411fa7e7d9521f23b6c5c4fbca8960a15d09cb84f7aaa02244d950094bb75
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Release History: opentelemetry-instrumentation-redis
2
2
 
3
+ ### v0.22.0 / 2022-05-02
4
+
5
+ * ADDED: Validate Using Enums
6
+ * FIXED: Add appraisals for redis 4.2-4.6
7
+
8
+ ### v0.21.3 / 2022-02-02
9
+
10
+ * FIXED: Prevent redis instrumentation from mutating the command
11
+
12
+ ### v0.21.2 / 2021-12-01
13
+
14
+ * (No significant changes)
15
+
3
16
  ### v0.21.1 / 2021-09-29
4
17
 
5
18
  * (No significant changes)
data/README.md CHANGED
@@ -47,8 +47,10 @@ end
47
47
  OpenTelemetry::SDK.configure do |c|
48
48
  c.use 'OpenTelemetry::Instrumentation::Redis', {
49
49
  # The obfuscation of arguments in the db.statement attribute is enabled by default.
50
- # To disable, set enable_statement_obfuscation to false.
51
- enable_statement_obfuscation: true,
50
+ # To include the full query, set db_statement to :include.
51
+ # To obfuscate, set db_statement to :obfuscate.
52
+ # To omit the attribute, set db_statement to :omit.
53
+ db_statement: :include,
52
54
  }
53
55
  end
54
56
  ```
@@ -21,7 +21,7 @@ module OpenTelemetry
21
21
 
22
22
  option :peer_service, default: nil, validate: :string
23
23
  option :trace_root_spans, default: true, validate: :boolean
24
- option :db_statement, default: :obfuscate, validate: ->(opt) { %I[omit include obfuscate].include?(opt) }
24
+ option :db_statement, default: :obfuscate, validate: %I[omit include obfuscate]
25
25
 
26
26
  private
27
27
 
@@ -71,11 +71,12 @@ module OpenTelemetry
71
71
  # and return the obfuscated command
72
72
  return 'AUTH ?' if command[0] == :auth
73
73
 
74
- command[0] = command[0].to_s.upcase
75
74
  if config[:db_statement] == :obfuscate
76
- command[0] + ' ?' * (command.size - 1)
75
+ command[0].to_s.upcase + ' ?' * (command.size - 1)
77
76
  else
78
- command.join(' ')
77
+ command_copy = command.dup
78
+ command_copy[0] = command_copy[0].to_s.upcase
79
+ command_copy.join(' ')
79
80
  end
80
81
  end.join("\n")
81
82
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Redis
10
- VERSION = '0.21.1'
10
+ VERSION = '0.22.0'
11
11
  end
12
12
  end
13
13
  end
@@ -14,7 +14,7 @@ module OpenTelemetry
14
14
  module Redis
15
15
  extend self
16
16
 
17
- CURRENT_ATTRIBUTES_HASH = Context.create_key('current-attributes-hash')
17
+ CURRENT_ATTRIBUTES_HASH = Context.create_key('redis-attributes-hash')
18
18
 
19
19
  private_constant :CURRENT_ATTRIBUTES_HASH
20
20
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.22.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: 2022-05-02 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.20.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.20.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: appraisal
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -199,10 +199,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
199
199
  licenses:
200
200
  - Apache-2.0
201
201
  metadata:
202
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.21.1/file.CHANGELOG.html
202
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.22.0/file.CHANGELOG.html
203
203
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/redis
204
204
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
205
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.21.1
205
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.22.0
206
206
  post_install_message:
207
207
  rdoc_options: []
208
208
  require_paths: