Skip to content

Commit

Permalink
remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
mensfeld committed Oct 23, 2023
1 parent 1b98a70 commit d6385d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/waterdrop/instrumentation/callbacks/delivery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Callbacks
# We do however still want to instrument it for traceability.
class Delivery
# @param producer_id [String] id of the current producer
# @param transactional [Boolean] is this handle for a transactional or regular producer
# @param monitor [WaterDrop::Instrumentation::Monitor] monitor we are using
def initialize(producer_id, transactional, monitor)
@producer_id = producer_id
Expand Down Expand Up @@ -77,6 +78,9 @@ def instrument_error(delivery_report)
)
end

# Builds appropriate rdkafka error
# @param delivery_report [Rdkafka::Producer::DeliveryReport] delivery report
# @return [::Rdkafka::RdkafkaError]
def build_error(delivery_report)
::Rdkafka::RdkafkaError.new(delivery_report.error)
end
Expand Down

0 comments on commit d6385d8

Please sign in to comment.