Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use delivery channel to get kafka producer metrics #162

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

agbpatro
Copy link
Collaborator

Description

Confluent provides the channel interface to get delivery reports. We should use that to get kafka metrics

Type of change

Please select all options that apply to this change:

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Checklist:

Confirm you have completed the following steps:

  • My code follows the style of this project.
  • I have performed a self-review of my code.
  • I have made corresponding updates to the documentation.
  • I have added/updated unit tests to cover my changes.
  • I have added/updated integration tests to cover my changes.

@agbpatro agbpatro force-pushed the use_delivery_channel branch 2 times, most recently from ec771d4 to 316273b Compare April 17, 2024 18:55
@agbpatro agbpatro changed the title Use delivery channels to get kafka producer metrics Use delivery channel to get kafka producer metrics Apr 17, 2024
@agbpatro agbpatro force-pushed the use_delivery_channel branch 2 times, most recently from de714ad to 7fdb73e Compare April 17, 2024 18:56
@@ -58,9 +60,11 @@ func NewProducer(config *kafka.ConfigMap, namespace string, reliableAckWorkers i
logger: logger,
airbrakeHandler: airbrakeHandler,
reliableAck: reliableAckWorkers > 0,
deliveryChan: make(chan kafka.Event),
ackChan: ackChan,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this design for ackChan. Wouldn't we need an ackChan per connection?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right. I have disabled setting reliable ack config for now. Will remove the restriction when its supported properly

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, well we should complete the implementation or remove ackChan. Let's not leave code/variables around that aren't being used

@agbpatro agbpatro force-pushed the use_delivery_channel branch 2 times, most recently from 8ac098c to 8e96daa Compare April 17, 2024 20:16
Confluent provides the channel interface to get delivery reports
We should use that to get kafka metrics
Add more metrics for other failure mode
Disable reliable acks since it will not work as expected
@agbpatro agbpatro merged commit 03528fd into main Apr 17, 2024
5 checks passed
@agbpatro agbpatro deleted the use_delivery_channel branch April 17, 2024 22:29
@@ -54,6 +55,10 @@ func loadApplicationConfig(configFilePath string) (*Config, error) {
}
config.MetricCollector = metrics.NewCollector(config.Monitoring, logger)

// TODO disble this check when reliable acks are properly supported
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When is this going to be?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

None yet

3 participants