Skip to content

KAFKA-18628: Add node.id to the metrics reporter config override - #23097

Open
mingyen066 wants to merge 2 commits into
apache:trunkfrom
mingyen066:KAFKA-18628-metrics-reporter-node-id
Open

KAFKA-18628: Add node.id to the metrics reporter config override#23097
mingyen066 wants to merge 2 commits into
apache:trunkfrom
mingyen066:KAFKA-18628-metrics-reporter-node-id

Conversation

@mingyen066

@mingyen066 mingyen066 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

DynamicMetricReporterState overrides only broker.id when configuring
metrics reporters. Since broker.id will no longer be passed to plugins
from 5.0 (KIP-1232), pass node.id alongside it.

This also fixes an inconsistency: reconfigurables are handed
KafkaConfig#valuesFromThisConfig, so a reporter recreated by a dynamic
update saw node.id as an Integer while broker.id was a String.
Both are now passed as strings, matching what reporters see at startup.

Raised in
#22977 (comment).

Reviewers: Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions Bot added core Kafka Broker small Small PRs triage PRs from the community labels Aug 6, 2026

@chia7712 chia7712 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@chia7712

chia7712 commented Aug 6, 2026

Copy link
Copy Markdown
Member

@mingyen066 would you mind adding a test to ensure the props passed to the reporter include both id configs?

@mingyen066 mingyen066 changed the title KAFKA-18628: Pass node.id to metrics reporter plugins KAFKA-18628: Add node.id to the metrics reporter config override Aug 6, 2026
@mingyen066

Copy link
Copy Markdown
Collaborator Author

@chia7712 Added the test — it caught a real issue: without the fix, a dynamic update passes node.id to reporters as an Integer instead of a String. Title and description updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Kafka Broker small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants