Skip to content

Commit 573ad43

Browse files
committed
feat: rdkafka support to v0.19
Up to version v0.20.0 it is expected that changes are only in method signatures, so try supporting up to it rel #1325
1 parent 32e8fcb commit 573ad43

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

instrumentation/rdkafka/Appraisals

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[0.12.0 0.13.0 0.14.0].each do |version|
7+
%w[0.12.0 0.13.0 0.14.0 0.15.0 0.16.0 0.17.0 0.18.0 0.19.0].each do |version|
88
appraise "rdkafka-#{version}" do
99
gem 'rdkafka', "~> #{version}"
1010
end

instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module Rdkafka
1111
class Instrumentation < OpenTelemetry::Instrumentation::Base
1212
compatible do
1313
gem_version = Gem::Version.new(::Rdkafka::VERSION)
14-
Gem::Requirement.new('>= 0.10.0', '< 0.15.0').satisfied_by?(gem_version)
14+
Gem::Requirement.new('>= 0.10.0', '< 0.20.0').satisfied_by?(gem_version)
1515
end
1616

1717
install do |_config|

instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/patches/producer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ module Rdkafka
1010
module Patches
1111
# The Producer module contains the instrumentation patch the Producer#produce method
1212
module Producer
13-
def produce(topic:, payload: nil, key: nil, partition: nil, partition_key: nil, timestamp: nil, headers: nil)
13+
def produce(*args, **kwargs)
14+
topic = kwargs[:topic]
15+
headers = kwargs[:headers]
1416
attributes = {
1517
'messaging.system' => 'kafka',
1618
'messaging.destination' => topic,

0 commit comments

Comments
 (0)