feat(kafka): add MessageBroker/Kafka/Cluster/{id}/Topic/{topic} metrics#2914
Draft
shashank-reddy-nr wants to merge 1 commit into
Draft
feat(kafka): add MessageBroker/Kafka/Cluster/{id}/Topic/{topic} metrics#2914shashank-reddy-nr wants to merge 1 commit into
shashank-reddy-nr wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #2914 +/- ##
=============================================
- Coverage 70.71% 37.76% -32.95%
+ Complexity 10647 5466 -5181
=============================================
Files 881 879 -2
Lines 42947 43004 +57
Branches 6501 6512 +11
=============================================
- Hits 30368 16240 -14128
- Misses 9651 24501 +14850
+ Partials 2928 2263 -665 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Records per-cluster Kafka metrics (MessageBroker/Kafka/Cluster/{clusterId}/Topic/{topic}/Produce
and MessageBroker/Kafka/Cluster/{clusterId}/Topic/{topic}/Consume) to let customers track
throughput broken out by Kafka cluster, not just by topic. The cluster ID is fetched
once per unique broker set via a background AdminClient call; the hot produce/consume path
has no additional overhead. The feature is always-on and best-effort — it does not inject
anything into Kafka wire headers and does not add span or custom attributes.
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
abc67b2 to
d4bc5df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three new instrumentation modules that record per-cluster, per-topic Kafka metrics across all supported Kafka client versions. The cluster UUID is read from the client's own already-fetched Metadata — no extra broker connection is opened.
What's changed
Metric shape
The cluster UUID is available once the Kafka client has completed its first metadata refresh. Until then, calls fall back to the existing topic-only metric path.
Before contributing, please read our contributing guidelines and code of conduct.
Overview
Describe the changes present in the pull request
Related Github Issue
Include a link to the related GitHub issue, if applicable
Testing
The agent includes a suite of tests which should be used to
verify your changes don't break existing functionality. These tests will run with
Github Actions when a pull request is made. More details on running the tests locally can be found
here,
Checks