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

KAFKA-17248 - KIP 1076 implementation #17021

Open
wants to merge 52 commits into
base: trunk
Choose a base branch
from

Conversation

bbejeck
Copy link
Contributor

@bbejeck bbejeck commented Aug 27, 2024

Implementation of KIP-1076 to allow for adding client application metrics to the KIP-714 framework

Integration and unit tests forthcoming

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@bbejeck bbejeck marked this pull request as draft August 27, 2024 22:26
@bbejeck bbejeck added streams kip Requires or implements a KIP KIP-1076 Metrics for client applications KIP-714 extension labels Aug 27, 2024
@bbejeck bbejeck changed the title [WIP NO MERGE] KAFKA-17248 - KIP 1076 implementation KAFKA-17248 - KIP 1076 implementation Sep 2, 2024
@bbejeck bbejeck marked this pull request as ready for review September 3, 2024 20:33
Copy link
Collaborator

@apoorvmittal10 apoorvmittal10 left a 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 @bbejeck. I have taken a pass and some comments.

@bbejeck
Copy link
Contributor Author

bbejeck commented Sep 5, 2024

Thanks for the comments @apoorvmittal10 - I've addressed your comments.

Copy link
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

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

Not sure if I understand the end-to-end wiring already, so need to make another pass.

Btw: should we also verify state store metrics (or are they automatically verified as part of task metrics)?

@bbejeck
Copy link
Contributor Author

bbejeck commented Sep 9, 2024

should we also verify state store metrics (or are they automatically verified as part of task metrics)?

They are covered as part of task metrics, but I expanded the test to explicitly verify state store metrics are correct as well

Copy link
Member

@mjsax mjsax left a 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 update. Made another pass.

@bbejeck
Copy link
Contributor Author

bbejeck commented Sep 13, 2024

@mjsax thanks for the second review, I've addressed your comments

@bbejeck
Copy link
Contributor Author

bbejeck commented Sep 30, 2024

@mjsax, @apoorvmittal10, @AndrewJSchofield comments addressed

Copy link
Collaborator

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

Just one remaining comment.

@bbejeck
Copy link
Contributor Author

bbejeck commented Oct 1, 2024

@AndrewJSchofield, thanks for the review; I've addressed your comment.

Copy link
Collaborator

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -1812,7 +1812,6 @@ public Map<String, Object> getAdminConfigs(final String clientId) {

// add client id with stream client id prefix
props.put(CommonClientConfigs.CLIENT_ID_CONFIG, clientId);

Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

blank line should be back in now

Copy link
Member

Choose a reason for hiding this comment

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

Still see it :)

Comment on lines +170 to +173
.filter(metricName -> metricName.tags().containsKey("thread-id")).map(mn -> {
final String name = mn.name().replace('-', '.');
final String group = mn.group().replace("-metrics", "").replace('-', '.');
return "org.apache.kafka." + group + "." + name;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to format the Kafka Streams metrics names into the KIP-714 naming format convention.

all clients in the ClientsInstanceIds in consumerInstanceIds map. This PR makes sure only the main consumer client instance id is selected.
@mjsax
Copy link
Member

mjsax commented Nov 2, 2024

@bbejeck Can you rebase this PR to resolve merge conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Gradle build or GitHub Actions clients consumer core Kafka Broker kip Requires or implements a KIP KIP-1076 Metrics for client applications KIP-714 extension producer streams
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants