opentelemetry-instrumentation-redis 0.15.0 → 0.16.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: b3ed1b8c5e5325161458aacff91c98222a5d8725ca4553e1b4014abadf1c01cd
4
- data.tar.gz: df6b178a826a281cd6b1487860a45dfa08e92b411f40691855d9a79babd98e43
3
+ metadata.gz: 587058ff3953c4a7e6f36f95e9ddbf31d354f27d3cacbea5df8a8b32109d8665
4
+ data.tar.gz: b18483438ba8fe1fac37335ca2b3418addbca163fefdda87067ef022f0334d4b
5
5
  SHA512:
6
- metadata.gz: 29254b91daef97db3703e96d84f1bd44ae6229cf5db558a5a7d5e48b4322b3cf987eece0826a1565c978202e241194690c04a2152ee8bdb898ef54189e046a24
7
- data.tar.gz: 223ba45f7b5a1ed4d975418b58487d45400394fcf215f2c2e16c7941eb2c5514280fbd7e7bfbede9812cc94c2e8987b3e3e40766a9ecb70072cb305a8e33ac40
6
+ metadata.gz: bc03b9a9f0cd69da4d98018dfff9b2d0b4fce977904df0a5e460c40213a38abd80462146a11d7d77fd62995c3a87688b18965b61c332cf9dee078d977a6cd98f
7
+ data.tar.gz: 7e3c7540439f87b3786b36da587854443eadd1ef9b5e3096c7fb20934bdcc553179cd2d399ca1312e719c5de20ec349dae1a49421e56ca726ceb31bdda675f38
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History: opentelemetry-instrumentation-redis
2
2
 
3
+ ### v0.16.0 / 2021-03-17
4
+
5
+ * FIXED: Update DB semantic conventions
6
+ * FIXED: Example scripts now reference local common lib
7
+ * DOCS: Replace Gitter with GitHub Discussions
8
+
3
9
  ### v0.15.0 / 2021-02-18
4
10
 
5
11
  * ADDED: Add instrumentation config validation
data/README.md CHANGED
@@ -49,7 +49,7 @@ An example of usage can be seen in [`example/redis.rb`](https://github.com/open-
49
49
 
50
50
  The `opentelemetry-instrumentation-redis` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
51
51
 
52
- The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us on our [gitter channel][ruby-gitter] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
52
+ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
53
53
 
54
54
  ## License
55
55
 
@@ -61,4 +61,4 @@ Apache 2.0 license. See [LICENSE][license-github] for more information.
61
61
  [license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/LICENSE
62
62
  [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
63
63
  [community-meetings]: https://github.com/open-telemetry/community#community-meetings
64
- [ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
64
+ [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
@@ -50,11 +50,10 @@ module OpenTelemetry
50
50
 
51
51
  attributes = {
52
52
  'db.system' => 'redis',
53
- 'db.instance' => options[:db].to_s,
54
- 'db.url' => "redis://#{host}:#{port}",
55
53
  'net.peer.name' => host,
56
54
  'net.peer.port' => port
57
55
  }
56
+ attributes['db.redis.database_index'] = options[:db] unless options[:db].zero?
58
57
  attributes['peer.service'] = config[:peer_service] if config[:peer_service]
59
58
  attributes.merge(OpenTelemetry::Instrumentation::Redis.attributes)
60
59
  end
@@ -30,13 +30,13 @@ module OpenTelemetry
30
30
  return 'AUTH ?' if auth_command?(command_args)
31
31
 
32
32
  cmd = command_args.map { |x| format_arg(x) }.join(' ')
33
- truncate(cmd, CMD_MAX_LEN)
33
+ OpenTelemetry::Common::Utilities.truncate(cmd, CMD_MAX_LEN)
34
34
  end
35
35
 
36
36
  def format_arg(arg)
37
37
  str = arg.is_a?(Symbol) ? arg.to_s.upcase : arg.to_s
38
38
  str = OpenTelemetry::Common::Utilities.utf8_encode(str, binary: true)
39
- truncate(str, VALUE_MAX_LEN)
39
+ OpenTelemetry::Common::Utilities.truncate(str, VALUE_MAX_LEN)
40
40
  rescue StandardError => e
41
41
  OpenTelemetry.logger.debug("non formattable Redis arg #{str}: #{e}")
42
42
  PLACEHOLDER
@@ -55,10 +55,6 @@ module OpenTelemetry
55
55
 
56
56
  command_args
57
57
  end
58
-
59
- def truncate(string, size)
60
- string.size > size ? "#{string[0...size - 3]}..." : string
61
- end
62
58
  end
63
59
  end
64
60
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Redis
10
- VERSION = '0.15.0'
10
+ VERSION = '0.16.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.15.0
4
+ version: 0.16.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-02-18 00:00:00.000000000 Z
11
+ date: 2021-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.15.0
19
+ version: 0.16.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.15.0
26
+ version: 0.16.0
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.15.0
33
+ version: 0.16.0
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.15.0
40
+ version: 0.16.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -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-redis/v0.15.0/file.CHANGELOG.html
203
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.16.0/file.CHANGELOG.html
204
204
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/redis
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-redis/v0.15.0
206
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.16.0
207
207
  post_install_message:
208
208
  rdoc_options: []
209
209
  require_paths: