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

feat: improved karafka plugin for insights #625

Merged
merged 18 commits into from
Oct 29, 2024
Merged

Conversation

roelbondoc
Copy link
Member

This adds a more comprehensive event listener for monitoring Karafka allowing the plugin to send more event and metrics data to Insights. The error reporting code has also been extracted to its own listener class and now monitors both consumers and producers.

To help facilitate the added complexities and increased data output of this change, I also added two new configuration parameters to allow for fine grained control.

  • karafka.insights.events — Defaults to true. Allows you to disable the plugin from automatically sending Insights events for consumer_consumed and error_occurred notifications.
  • karafka.insights.metrics — Defaults to true. Allows you to disable the plugin from collecting various aggregated metrics.

The following changes were also made:

  • Added min, max, avg, and latest values to the histogram payload.
  • All values passed to a metric can now use the value key. This allows for a more uniform interface when working with different metric types.

Before submitting a pull request, please make sure the following is done:

  1. If you've fixed a bug or added code that should be tested, add tests!
  2. Run rake spec in the repository root.
  3. Use a pull request title that conforms to conventional commits.

This implements a new Karafka subscriber that monitors more relevant
events. The subscriber will then emit events and metrics where
applicable.

This also includes new configuration parameters that let you enable and
disable Karafka specific Insights data. These are enabled by default.

```
karafka:
  insights:
    events: [boolean] # allow plugin to emit events from monitor
    metrics: [boolean] # allow plugin to emit metrics from monitor
```
@roelbondoc roelbondoc requested a review from a team October 29, 2024 17:45
@roelbondoc roelbondoc merged commit 21880fc into master Oct 29, 2024
59 checks passed
@roelbondoc roelbondoc deleted the improved-karafka-events branch October 29, 2024 20:24
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