-
Notifications
You must be signed in to change notification settings - Fork 14.8k
KAFKA-19734 Adding application tag to clientstate metric #20766
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
KAFKA-19734 Adding application tag to clientstate metric #20766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @gensericghiro! Can you update/add a test to StreamsMetricsImplTest otherwise lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gensericghiro LGTM
|
Merged #20766 into trunk |
|
@gensericghiro let's do the documentation in a follow-up PR |
| final Map<String, String> tagMap = new LinkedHashMap<>(); | ||
| tagMap.put(CLIENT_ID_TAG, clientId); | ||
| tagMap.put(PROCESS_ID_TAG, processId); | ||
| tagMap.put(APPLICATION_ID_TAG, applicationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pardon me. I see this new tag applied al all metrics, yet the KIP only specifies the client-state metric. Am I misunderstanding the scope? thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, good catch. It doesn't seem like I can add a tag for a specific metric however. Since addClientStateTelemetryMetric is calling the generic addClientLevelMutableMetric method, where tags get added, we'd need to add conditional logic there, which I don't think is something we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chia7712 - thanks for pointing this out. I'm going to start a discussion on the mailing list with a couple of options on how to address the situation.
Summary
As a follow-on to the improvements introduced in
KIP-1091
it would be useful to add the application-id as a tag to the
client-statemetric. This allows Kafka Streams developers andoperators to connect metrics containing a
thread-id(which embeds theapplication-id) across separate deployments of Kafka Streamsinstances, which are members of the same logical application.
Reviewers: Bill Bejeck[email protected] Matthias
Sax[email protected]