aliehsaeedii opened a new pull request, #22664: URL: https://github.com/apache/kafka/pull/22664
## Summary Implements the broker-side observability sensors for the streams-group topology-description plugin's `setTopology` and `getTopology` operations, as specified in [KIP-1331](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1331%3A+Streams+Group+Topology+Description+Plugin) ([KAFKA-20717](https://issues.apache.org/jira/browse/KAFKA-20717)). The `delete` and `cleanup` sensors (KAFKA-20623/KAFKA-20624) are already in place; this change mirrors their pattern for the remaining `set`/`get` sensors. New sensors registered under `kafka.server:type=group-coordinator-metrics`: - `streams-group-topology-description-set-success-{rate,count}` - `streams-group-topology-description-set-error-{rate,count}` - `streams-group-topology-description-get-success-{rate,count}` - `streams-group-topology-description-get-error-{rate,count}` ## Implementation notes - **Set**: recorded at the `invokeSetTopology` dispatch in `GroupCoordinatorService`. `SUCCESS` increments `set-success`; both `PERMANENT` and `TRANSIENT` fold into `set-error` (any failure type counts as an error, per the KIP). - **Get**: recorded in `StreamsGroupTopologyDescriptionManager`, where `plugin.getTopology` resolves — the only place the per-call outcome surfaces. A `null` return counts as a **success** (it maps to `NOT_STORED`, not an error); exceptional/synchronous-throw/null-future outcomes count as `get-error`. ## Testing - `GroupCoordinatorMetricsTest`: added the 8 new metric names to the registration assertions and a new test verifying `recordSensor` drives the correct meters. - `GroupCoordinatorServiceTopologyDescriptionTest`: 6 new tests covering set success/permanent/transient and get available/null-return/error outcomes. - Full `GroupCoordinatorServiceTest`, checkstyle, and spotbugs pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
