opentelemetry-instrumentation-redis 0.20.0 → 0.21.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: 72766de7d14d870f0f968e6617b155545873f4433c6479217ae41de0ec882b95
4
- data.tar.gz: 9184a77c00acffdc6387eb3640ce0f3526d8b095183c3db11d1156b4c909b05e
3
+ metadata.gz: 623d653fb0f83f2c6587fab77efa962491d5eb034cd4e8c98dda39b572d1a613
4
+ data.tar.gz: 74e7a1a810ad625768eec316a4b16ec8ece8ae4a93b3c3cc1b16da135d3c6bc8
5
5
  SHA512:
6
- metadata.gz: 2280219af1930d4037e7ae901a40686d78486d6823a6bdc0f80d2fefc593b6570986100d369d078ff78ca403763ba3182400edb70a7543b7d1f4fe03c42cad9e
7
- data.tar.gz: b374b6e0f8e6959406443a87735bd9b43086d690248b31213ed8b959e8ec0a13ef3f44f244ea71153b0cab5a9aa756e7271c291636ca1eb3ead5ade9b597df4a
6
+ metadata.gz: 601147ca939a22bf4654dfba53675f56800ddf0ca3cc995e9321843e5738200e775c3dc9ac3f49cb9d2b0c62728ddc391b3f12d80ec46a4689d8a6ba22793f20
7
+ data.tar.gz: 5bb1f8966cecfce7d81a1c8124545394df58c720b5a4730dad944cca488a9e53336be896490137151a812fbb2f555c3125d61ba21001c789ed52a18e15595d6f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-redis
2
2
 
3
+ ### v0.21.0 / 2021-08-12
4
+
5
+ * ADDED: Add toggle for redis db.statement attribute
6
+
3
7
  ### v0.20.0 / 2021-06-23
4
8
 
5
9
  * BREAKING CHANGE: Total order constraint on span.status=
@@ -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 :enable_statement_obfuscation, default: true, validate: :boolean
24
+ option :db_statement, default: :obfuscate, validate: ->(opt) { %I[omit include obfuscate].include?(opt) }
25
25
 
26
26
  private
27
27
 
@@ -29,10 +29,12 @@ module OpenTelemetry
29
29
  attributes['peer.service'] = config[:peer_service] if config[:peer_service]
30
30
  attributes.merge!(OpenTelemetry::Instrumentation::Redis.attributes)
31
31
 
32
- parsed_commands = parse_commands(commands)
33
- parsed_commands = OpenTelemetry::Common::Utilities.truncate(parsed_commands, MAX_STATEMENT_LENGTH)
34
- parsed_commands = OpenTelemetry::Common::Utilities.utf8_encode(parsed_commands, binary: true)
35
- attributes['db.statement'] = parsed_commands
32
+ unless config[:db_statement] == :omit
33
+ parsed_commands = parse_commands(commands)
34
+ parsed_commands = OpenTelemetry::Common::Utilities.truncate(parsed_commands, MAX_STATEMENT_LENGTH)
35
+ parsed_commands = OpenTelemetry::Common::Utilities.utf8_encode(parsed_commands, binary: true)
36
+ attributes['db.statement'] = parsed_commands
37
+ end
36
38
 
37
39
  span_name = if commands.length == 1
38
40
  commands[0][0].to_s.upcase
@@ -70,7 +72,7 @@ module OpenTelemetry
70
72
  return 'AUTH ?' if command[0] == :auth
71
73
 
72
74
  command[0] = command[0].to_s.upcase
73
- if config[:enable_statement_obfuscation]
75
+ if config[:db_statement] == :obfuscate
74
76
  command[0] + ' ?' * (command.size - 1)
75
77
  else
76
78
  command.join(' ')
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Redis
10
- VERSION = '0.20.0'
10
+ VERSION = '0.21.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-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.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-06-24 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.rc2
19
+ version: 1.0.0.rc3
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: 1.0.0.rc2
26
+ version: 1.0.0.rc3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: opentelemetry-common
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.19.0
33
+ version: 0.19.1
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.0
40
+ version: 0.19.1
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.1
47
+ version: 0.18.2
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.1
54
+ version: 0.18.2
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.20.0/file.CHANGELOG.html
202
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.21.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.20.0
205
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.21.0
206
206
  post_install_message:
207
207
  rdoc_options: []
208
208
  require_paths: