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: b99bed085832525c7ad37cc4ff52d4cf8b08b44c74c6d426bd4df51f5149b29f
4
- data.tar.gz: 3354410993f139e875e6e41b347698805fe127d8583112cd144efec707c37978
3
+ metadata.gz: 841d6531d9fc1d99fa58a1f13e04366cf51506c7da97aad4b0d59dea416351e7
4
+ data.tar.gz: f0380dd997ecfa97a93adb69fd11ee5e477093c909d325f390fec8d7976a5ba8
5
5
  SHA512:
6
- metadata.gz: 863f17694ef7ad881d06334962c0e02a9a0f65e8383ad4c5660c43119261a34bd6197dfe711c999f9d71ac36f3603ac4e2f2f0860dfab85940965a6125ced691
7
- data.tar.gz: ebcc9a0e46884e57fa6aca92c8277171c560dad42b5ead8736be8f9c31d9216feae71bc08efa6bbafddd6bdb2738774f5a6ee0725a1c0103aeb716e98f86d056
6
+ metadata.gz: 588e0e8815ea196046122fa037b262869cdc499181b373b9ea4cde94fa9c059317f358f3aaab5fbfc4bf40ebdabfdb8650b06cbca43456329564051c9ce32751
7
+ data.tar.gz: a5b910f19f669258a69cad57e61510734da9bf679e148c54f14ad5c3afafde86b892f664ded2b217da3fcd961c4dcf07a04eed2161e3a622249091639aff8c93
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-racecar
2
2
 
3
+ ### v0.1.2 / 2023-03-24
4
+
5
+ * FIXED: Skip recording non-utf8 kafka keys in racecar and rdkafka
6
+
3
7
  ### v0.1.1 / 2023-01-14
4
8
 
5
9
  * DOCS: More gem documentation fixes
@@ -35,7 +35,9 @@ module OpenTelemetry
35
35
  'messaging.kafka.offset' => payload[:offset]
36
36
  }
37
37
 
38
- attributes['messaging.kafka.message_key'] = payload[:key] if payload[:key]
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
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Racecar
10
- VERSION = '0.1.1'
10
+ VERSION = '0.1.2'
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-racecar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.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-01-14 00:00:00.000000000 Z
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.1/file/CHANGELOG.md
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.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: