Skip to content

Commit 4d85678

Browse files
meridionalyuyang08
authored andcommitted
always use hostname as the default broker name (pinterest#179)
In the previous implementation, we only have ` brokerStats.setName(OperatorUtil.getHostname())` when `ec2metadata` is disabled. This is to always use hostname as broker name by default.
1 parent 39dac0a commit 4d85678

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafkastats/src/main/java/com/pinterest/doctorkafka/stats/BrokerStatsRetriever.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,10 @@ private void retrieveNetworkStats(MBeanServerConnection mbs, Set<String> topics)
407407
*/
408408
private void setBrokerInstanceInfo() {
409409
BufferedReader input = null;
410+
brokerStats.setName(OperatorUtil.getHostname());
410411

411412
// out quick if we don't want to use ec2metadata command.
412413
if (disableEc2metadata) {
413-
brokerStats.setName(OperatorUtil.getHostname());
414414
return;
415415
}
416416

0 commit comments

Comments
 (0)