Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current state"Voting"Accepted

Discussion thread: here

JIRA: KAFKA-15831

...

Code Block
{
  "apiKey": XX,
  "type": "request",
  "listeners": ["broker", "controller"],
  "name": "ListClientMetricsResourcesRequest",
  "validVersions": "0",
  "flexibleVersions": "0+",
  "fields": [
  ]
}

{
  "apiKey": XX,
  "type": "response",
  "name": "ListClientMetricsResourcesResponse",
  "validVersions": "0",
  "flexibleVersions": "0+",
  "fields": [
      { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
        "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
      { "name": "ErrorCode", "type": "int16", "versions": "0+" },
      { "name": "ClientMetricsResources", "type": "[]ClientMetricsResource", "versions": "0+", "fields": [
        { "name": "Name", "type": "string", "versions": "0+" }
      ]}
  ]
}

...

Code Block
languagejava
package org.apache.kafka.clients.admin;

@InterfaceStability.Evolving
public class ClientMetricsResourceListing {
    private final String name;

    public ClientMetricsResourceListing(String name) {
        this.name = name;
    }

    public String name() {
        return name;
    }
}

Tools

kafka-client-metrics.sh

A new option --list  is added to kafka-client-metrics.sh which lists the client metrics resources without describing them.

Code Block
languagebash
$ kafka-client-metrics.sh --bootstrap-server $BROKERS --list

Security

Client metrics configuration resources are secured using the CLUSTER resource.

...