opentelemetry-instrumentation-racecar 0.1.0 → 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: '081f1c98f09b28908ceaf6d8471370939cd24842f1b87f138fda3cfffca2c501'
4
- data.tar.gz: 3c6abb5e99ad94e42a8ac13a850a630a9aca98727594a8230863f7afc1fc505e
3
+ metadata.gz: 841d6531d9fc1d99fa58a1f13e04366cf51506c7da97aad4b0d59dea416351e7
4
+ data.tar.gz: f0380dd997ecfa97a93adb69fd11ee5e477093c909d325f390fec8d7976a5ba8
5
5
  SHA512:
6
- metadata.gz: 59c2b255cb55fdbfa4459d9fd2bc423200cac1bf9f243a5d0b7a5f5b990b8bb2e5418d16b1adca0733c8bb87886a8c8a439ac0dd547e7ffcfb939f532f088ca4
7
- data.tar.gz: 2b9bf92afd6ec3c59f8e5be80eff93eb4343f1612f2c39cc1538ccc8035845533b868c9acdd98e4665aa80b567d2e21057df4cee19265fcb269fea50e228b401
6
+ metadata.gz: 588e0e8815ea196046122fa037b262869cdc499181b373b9ea4cde94fa9c059317f358f3aaab5fbfc4bf40ebdabfdb8650b06cbca43456329564051c9ce32751
7
+ data.tar.gz: a5b910f19f669258a69cad57e61510734da9bf679e148c54f14ad5c3afafde86b892f664ded2b217da3fcd961c4dcf07a04eed2161e3a622249091639aff8c93
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
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
+
7
+ ### v0.1.1 / 2023-01-14
8
+
9
+ * DOCS: More gem documentation fixes
10
+
3
11
  ### v0.1.0 / 2022-11-08
4
12
 
5
13
  * Initial release.
@@ -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.0'
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.0
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: 2022-11-08 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
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.17'
75
+ version: '2.4'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.17'
82
+ version: '2.4'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 12.3.3
145
+ version: '13.0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 12.3.3
152
+ version: '13.0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rspec-mocks
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -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://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-racecar/v0.1.0/file.CHANGELOG.html
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://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-racecar/v0.1.0
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: