opentelemetry-instrumentation-redis 0.9.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/lib/opentelemetry-instrumentation-redis.rb +1 -1
- data/lib/opentelemetry/instrumentation.rb +1 -1
- data/lib/opentelemetry/instrumentation/redis.rb +2 -1
- data/lib/opentelemetry/instrumentation/redis/instrumentation.rb +1 -1
- data/lib/opentelemetry/instrumentation/redis/patches/client.rb +10 -4
- data/lib/opentelemetry/instrumentation/redis/utils.rb +2 -21
- data/lib/opentelemetry/instrumentation/redis/version.rb +2 -2
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a5cd190659e00aace1df688dce3ac8f38f2ac40d7efa19cbb5aca0806dce096
|
4
|
+
data.tar.gz: 7f9caf155420b96cbd635f38ee80edef4edb2eec2be16f09ad4e3edcf50500aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 753997ce1412b22461cb5ab347a42aad85242643c281a0222f75a32e148c4e9a2d36befb2a926827cc2741d6d692b6528ae008c6f6f9d983b86b2d8089de7382
|
7
|
+
data.tar.gz: dde075a5056b9067d8692a3fec46a8e0f48bb120526a85558210a6b80f14daeac87c6f9271b2fc452318610894dd3489f50285a3d7795dd52f6ff3176acb23a7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-redis
|
2
2
|
|
3
|
+
### v0.13.0 / 2021-01-29
|
4
|
+
|
5
|
+
* (No significant changes)
|
6
|
+
|
7
|
+
### v0.12.0 / 2020-12-24
|
8
|
+
|
9
|
+
* (No significant changes)
|
10
|
+
|
11
|
+
### v0.11.0 / 2020-12-11
|
12
|
+
|
13
|
+
* ADDED: Accept config for redis peer service attribute
|
14
|
+
* ADDED: Move utf8 encoding to common utils
|
15
|
+
* FIXED: Copyright comments to not reference year
|
16
|
+
|
17
|
+
### v0.10.1 / 2020-12-09
|
18
|
+
|
19
|
+
* FIXED: Semantic conventions db.type -> db.system
|
20
|
+
|
21
|
+
### v0.10.0 / 2020-12-03
|
22
|
+
|
23
|
+
* (No significant changes)
|
24
|
+
|
3
25
|
### v0.9.0 / 2020-11-27
|
4
26
|
|
5
27
|
* BREAKING CHANGE: Add timeout for force_flush and shutdown
|
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
|
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.
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ end
|
|
43
43
|
|
44
44
|
## Example
|
45
45
|
|
46
|
-
An example of usage can be seen in [`example/redis.rb`](https://github.com/open-telemetry/opentelemetry-ruby/blob/
|
46
|
+
An example of usage can be seen in [`example/redis.rb`](https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/redis/example/redis.rb).
|
47
47
|
|
48
48
|
## How can I get involved?
|
49
49
|
|
@@ -58,7 +58,7 @@ Apache 2.0 license. See [LICENSE][license-github] for more information.
|
|
58
58
|
[redis-home]: https://redis.io
|
59
59
|
[bundler-home]: https://bundler.io
|
60
60
|
[repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
|
61
|
-
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/
|
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
64
|
[ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
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
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
@@ -48,18 +48,24 @@ module OpenTelemetry
|
|
48
48
|
host = options[:host]
|
49
49
|
port = options[:port]
|
50
50
|
|
51
|
-
|
52
|
-
'db.
|
51
|
+
attributes = {
|
52
|
+
'db.system' => 'redis',
|
53
53
|
'db.instance' => options[:db].to_s,
|
54
54
|
'db.url' => "redis://#{host}:#{port}",
|
55
55
|
'net.peer.name' => host,
|
56
56
|
'net.peer.port' => port
|
57
|
-
|
57
|
+
}
|
58
|
+
attributes['peer.service'] = config[:peer_service] if config[:peer_service]
|
59
|
+
attributes.merge(OpenTelemetry::Instrumentation::Redis.attributes)
|
58
60
|
end
|
59
61
|
|
60
62
|
def tracer
|
61
63
|
Redis::Instrumentation.instance.tracer
|
62
64
|
end
|
65
|
+
|
66
|
+
def config
|
67
|
+
Redis::Instrumentation.instance.config
|
68
|
+
end
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
4
|
#
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
6
6
|
|
@@ -11,7 +11,6 @@ module OpenTelemetry
|
|
11
11
|
module Utils
|
12
12
|
extend self
|
13
13
|
|
14
|
-
STRING_PLACEHOLDER = ''.encode(::Encoding::UTF_8).freeze
|
15
14
|
PLACEHOLDER = '?'
|
16
15
|
VALUE_MAX_LEN = 50
|
17
16
|
CMD_MAX_LEN = 500
|
@@ -36,7 +35,7 @@ module OpenTelemetry
|
|
36
35
|
|
37
36
|
def format_arg(arg)
|
38
37
|
str = arg.is_a?(Symbol) ? arg.to_s.upcase : arg.to_s
|
39
|
-
str = utf8_encode(str, binary: true
|
38
|
+
str = OpenTelemetry::Common::Utilities.utf8_encode(str, binary: true)
|
40
39
|
truncate(str, VALUE_MAX_LEN)
|
41
40
|
rescue StandardError => e
|
42
41
|
OpenTelemetry.logger.debug("non formattable Redis arg #{str}: #{e}")
|
@@ -60,24 +59,6 @@ module OpenTelemetry
|
|
60
59
|
def truncate(string, size)
|
61
60
|
string.size > size ? "#{string[0...size - 3]}..." : string
|
62
61
|
end
|
63
|
-
|
64
|
-
def utf8_encode(str, options = {})
|
65
|
-
str = str.to_s
|
66
|
-
|
67
|
-
if options[:binary]
|
68
|
-
# This option is useful for "gracefully" displaying binary data that
|
69
|
-
# often contains text such as marshalled objects
|
70
|
-
str.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
|
71
|
-
elsif str.encoding == ::Encoding::UTF_8
|
72
|
-
str
|
73
|
-
else
|
74
|
-
str.encode(::Encoding::UTF_8)
|
75
|
-
end
|
76
|
-
rescue StandardError => e
|
77
|
-
OpenTelemetry.logger.debug("Error encoding string in UTF-8: #{e}")
|
78
|
-
|
79
|
-
options.fetch(:placeholder, STRING_PLACEHOLDER)
|
80
|
-
end
|
81
62
|
end
|
82
63
|
end
|
83
64
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright
|
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 Redis
|
10
|
-
VERSION = '0.
|
10
|
+
VERSION = '0.13.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.
|
4
|
+
version: 0.13.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:
|
11
|
+
date: 2021-01-30 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.
|
19
|
+
version: 0.13.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.
|
26
|
+
version: 0.13.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.13.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.13.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: appraisal
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,10 +200,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
186
200
|
licenses:
|
187
201
|
- Apache-2.0
|
188
202
|
metadata:
|
189
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.
|
190
|
-
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/
|
203
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.13.0/file.CHANGELOG.html
|
204
|
+
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/redis
|
191
205
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
192
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.
|
206
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-redis/v0.13.0
|
193
207
|
post_install_message:
|
194
208
|
rdoc_options: []
|
195
209
|
require_paths:
|