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

[v23.1.x] Backport of PR #9430 - Add new metering API to track Kafka traffic #9666

Merged

Conversation

graphcareful
Copy link
Contributor

@graphcareful graphcareful commented Mar 27, 2023

Cover Letter

Backport of PR: #9077

UX Changes

  • Introducing 4 new configuration options:
    • enable_usage: To turn feature on/off (defaulted to off)
    • usage_num_windows: Number of historical windows of data of usage to track
    • usage_window_width_interval_sec: The length of time in seconds of a historical window
    • usage_disk_persistance_interval_sec: Length of time between writes of the historical data to disk, for persistence in case of shutdown/crashes

Release Notes

Improvements

  • Adds a new metering API for fine grained tracking of kafka metrics

@graphcareful graphcareful added the kind/backport PRs targeting a stable branch label Mar 27, 2023
@graphcareful graphcareful added this to the v23.1.x-next milestone Mar 27, 2023
@graphcareful graphcareful requested a review from a team as a code owner March 27, 2023 17:39
@graphcareful graphcareful requested review from andrewhsu and removed request for a team March 27, 2023 17:39
@graphcareful graphcareful changed the title Backport of PR #9430 - Add new metering API to track Kafka traffic [v23.1.x] Backport of PR #9430 - Add new metering API to track Kafka traffic Mar 27, 2023
- These two configuration properties control the bucketing interval and
length of history that will be kept for the new usage tracking mechanism.

(cherry picked from commit c57926c)
(cherry picked from commit e0b6c7c)
- Usage metrics are collected on a per request basis and are added to
the collector (kafka::usage_manager) after the request has been fully
processed.

- This occurs during the response handling phase, two exceptions are
accounted for which is traffic on internal topics in produce/fetch
requests, this number of bytes is decremented from the total
request/response size and forwarded to the usage_manager for recording.

(cherry picked from commit b7e2861)
- Return all cached usage results upon GET request to v1/usage

(cherry picked from commit f7265cf)
src/v/redpanda/CMakeLists.txt Outdated Show resolved Hide resolved
@graphcareful graphcareful merged commit e775d2c into redpanda-data:v23.1.x Mar 28, 2023
@vshtokman vshtokman modified the milestones: v23.1.x-next, v23.1.4 Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants