opentelemetry-instrumentation-racecar 0.1.1 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 841d6531d9fc1d99fa58a1f13e04366cf51506c7da97aad4b0d59dea416351e7
|
4
|
+
data.tar.gz: f0380dd997ecfa97a93adb69fd11ee5e477093c909d325f390fec8d7976a5ba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 588e0e8815ea196046122fa037b262869cdc499181b373b9ea4cde94fa9c059317f358f3aaab5fbfc4bf40ebdabfdb8650b06cbca43456329564051c9ce32751
|
7
|
+
data.tar.gz: a5b910f19f669258a69cad57e61510734da9bf679e148c54f14ad5c3afafde86b892f664ded2b217da3fcd961c4dcf07a04eed2161e3a622249091639aff8c93
|
data/CHANGELOG.md
CHANGED
@@ -35,7 +35,9 @@ module OpenTelemetry
|
|
35
35
|
'messaging.kafka.offset' => payload[:offset]
|
36
36
|
}
|
37
37
|
|
38
|
-
|
38
|
+
message_key = extract_message_key(payload[:key])
|
39
|
+
attributes['messaging.kafka.message_key'] = message_key if message_key
|
40
|
+
|
39
41
|
attributes
|
40
42
|
end
|
41
43
|
|
@@ -54,6 +56,15 @@ module OpenTelemetry
|
|
54
56
|
OpenTelemetry::Context.detach(token)
|
55
57
|
OpenTelemetry::Context.detach(parent_token)
|
56
58
|
end
|
59
|
+
|
60
|
+
def extract_message_key(key)
|
61
|
+
# skip encode if already valid utf8
|
62
|
+
return key if key.nil? || (key.encoding == Encoding::UTF_8 && key.valid_encoding?)
|
63
|
+
|
64
|
+
key.encode(Encoding::UTF_8)
|
65
|
+
rescue Encoding::UndefinedConversionError
|
66
|
+
nil
|
67
|
+
end
|
57
68
|
end
|
58
69
|
end
|
59
70
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-racecar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -256,10 +256,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
256
256
|
licenses:
|
257
257
|
- Apache-2.0
|
258
258
|
metadata:
|
259
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-racecar/0.1.
|
259
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-racecar/0.1.2/file/CHANGELOG.md
|
260
260
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/racecar
|
261
261
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
262
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-racecar/0.1.
|
262
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-racecar/0.1.2
|
263
263
|
post_install_message:
|
264
264
|
rdoc_options: []
|
265
265
|
require_paths:
|