# Client Metrics

APIs for managing KIP-714 client metrics subscriptions on a virtual cluster.

These APIs let you manage [KIP-714 client metrics subscriptions](/warpstream/kafka/configure-kafka-client/client-metrics-kip-714) on a WarpStream virtual cluster. A subscription is a named record that tells matching Kafka clients to push their internal producer/consumer metrics to the cluster on a schedule.

The same subscriptions are also manageable via the Kafka AdminClient (`kafka-configs.sh --entity-type client-metrics`). Both paths read and write the same store, so subscriptions you create with one are visible to the other.

## Subscription fields

Each subscription has a name and three configurable fields:

| Field | Description |
|---|---|
| `name` | Subscription name. Required. |
| `interval_ms` | How often matched clients push, in milliseconds. Default 300000 (5 minutes). Min 100, max 3600000 (1 hour). |
| `metrics` | Comma-separated list of metric-name prefixes the client should send. An empty value means "all metrics". |
| `match` | Comma-separated list of `key=regex` selectors that pick which clients this subscription applies to. An empty value matches every client. |

Match keys: `client_instance_id`, `client_id`, `client_software_name`, `client_software_version`, `client_source_address`, `client_source_port`. Patterns are full-string regex anchored as `^(?:pattern)$`. See [Client Metrics (KIP-714)](/warpstream/kafka/configure-kafka-client/client-metrics-kip-714#match-selectors) for details and gotchas.

## Authentication

All endpoints accept application keys. The list and describe endpoints additionally accept read-only keys; the update and delete endpoints require admin permissions.

## Limits

Up to 100 subscriptions are allowed per virtual cluster.