[ 
https://issues.apache.org/jira/browse/KAFKA-13147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Russell updated KAFKA-13147:
---------------------------------
    Description: 
When the broker is down, the {code}connection-close-total{code} keeps 
incrementing with each connection attempt.

This makes it more difficult to determine connection health.

{code:java}
System.out.println("Open count:  " + metrics.entrySet().stream()
                .filter(entry -> 
entry.getKey().name().equals("connection-creation-total"))
                .map(entry -> entry.getValue().metricValue())
                .collect(Collectors.toList()));
System.out.println("Close count: " + metrics.entrySet().stream()
        .filter(entry -> entry.getKey().name().equals("connection-close-total"))
        .map(entry -> entry.getValue().metricValue())
        .collect(Collectors.toList()));
{code}

{noformat}
Open count:  [1.0]
Close count: [0.0]
Open count:  [3.0]
Close count: [0.0]
Open count:  [3.0]
Close count: [8.0]
Open count:  [3.0]
Close count: [13.0]
Open count:  [3.0]
Close count: [17.0]
Open count:  [3.0]
Close count: [22.0]
{noformat}

It would also be more useful if metrics for connection counts by node were 
available.

  was:
When the broker is down, the {code}connection-close-total{code} keeps 
incrementing with each connection event.

This makes it more difficult to determine connection health.

{code:java}
System.out.println("Open count:  " + metrics.entrySet().stream()
                .filter(entry -> 
entry.getKey().name().equals("connection-creation-total"))
                .map(entry -> entry.getValue().metricValue())
                .collect(Collectors.toList()));
System.out.println("Close count: " + metrics.entrySet().stream()
        .filter(entry -> entry.getKey().name().equals("connection-close-total"))
        .map(entry -> entry.getValue().metricValue())
        .collect(Collectors.toList()));
{code}

{noformat}
Open count:  [1.0]
Close count: [0.0]
Open count:  [3.0]
Close count: [0.0]
Open count:  [3.0]
Close count: [8.0]
Open count:  [3.0]
Close count: [13.0]
Open count:  [3.0]
Close count: [17.0]
Open count:  [3.0]
Close count: [22.0]
{noformat}

It would also be more useful if metrics for connection counts by node were 
available.


> connection-close-total Metric Keeps Incrementing While Broker Down
> ------------------------------------------------------------------
>
>                 Key: KAFKA-13147
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13147
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 2.8.0
>            Reporter: Gary Russell
>            Priority: Major
>
> When the broker is down, the {code}connection-close-total{code} keeps 
> incrementing with each connection attempt.
> This makes it more difficult to determine connection health.
> {code:java}
> System.out.println("Open count:  " + metrics.entrySet().stream()
>               .filter(entry -> 
> entry.getKey().name().equals("connection-creation-total"))
>               .map(entry -> entry.getValue().metricValue())
>               .collect(Collectors.toList()));
> System.out.println("Close count: " + metrics.entrySet().stream()
>       .filter(entry -> entry.getKey().name().equals("connection-close-total"))
>       .map(entry -> entry.getValue().metricValue())
>       .collect(Collectors.toList()));
> {code}
> {noformat}
> Open count:  [1.0]
> Close count: [0.0]
> Open count:  [3.0]
> Close count: [0.0]
> Open count:  [3.0]
> Close count: [8.0]
> Open count:  [3.0]
> Close count: [13.0]
> Open count:  [3.0]
> Close count: [17.0]
> Open count:  [3.0]
> Close count: [22.0]
> {noformat}
> It would also be more useful if metrics for connection counts by node were 
> available.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to