Skip to content

Conversation

domodwyer
Copy link
Contributor

@domodwyer domodwyer commented Aug 4, 2022

Marks the ProducerClient as pub, so external code can inject instrumentation over the kafka client via decorators when constructing the BatchProducer.

This allows:

This is not a breaking API change.


  • feat: pub ProducerClient for instrumentation hook (9bf370a)

    This commit changes the visibility of the ProducerClient abstraction and the
    associated BatchProducer constructor method (used internally to swap out the
    real client impl with a mock for testing purposes.)
    
    This allows external code to optionally "hook" into the lower-level Kafka
    client calls, in order to inspect the Records being pushed to Kafka /
    instrument & evaluate produce errors / measure produce latency / etc.
    

This commit changes the visibility of the ProducerClient abstraction and
the associated BatchProducer constructor method (used internally to swap
out the real client impl with a mock for testing purposes.)

This allows external code to optionally "hook" into the lower-level
Kafka client calls, in order to inspect the Records being pushed to
Kafka / instrument & evaluate produce errors / measure produce latency /
etc.
@domodwyer domodwyer requested a review from crepererum August 4, 2022 12:45
@domodwyer domodwyer self-assigned this Aug 4, 2022
@domodwyer domodwyer merged commit bdd816e into main Aug 4, 2022
@domodwyer domodwyer deleted the dom/pub-client-trait branch August 4, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants