---
title: "K2 metrics in the dashboard and GraphQL Analytics API — Cloud Changelog"
description: "You can now monitor your K2 streams in the Cloudflare dashboard: how fast records are produced and consumed, how much each stream stores, and how far behi…"
url: "https://cloudchangelog.com/cloudflare/2026-11-23-k2-metrics"
updated: "2026-11-23"
---

[Back to feed](https://cloudchangelog.com/feed/2026-W48)

November 23, 2026 · Cloudflare

# K2 metrics in the dashboard and GraphQL Analytics API

- [K2](https://cloudchangelog.com/search?q=cloudflare-k2)

You can now monitor your [K2](https://developers.cloudflare.com/k2/) streams in the Cloudflare dashboard: how fast records are produced and consumed, how much each stream stores, and how far behind each subscription is.

In the Cloudflare dashboard, go to the **K2 Streams** page and select a stream.

[Go to **K2 Streams** ↗](https://dash.cloudflare.com/?to=/:account/k2)

Metrics appear in three places:

- **Overview** — Produce and consume rates over the last 5 minutes, stored bytes, and each subscription's records behind, oldest unread record, lag over the last hour, and bytes consumed.
- **Metrics** — Charts of bytes produced by input, bytes stored, and bytes delivered to each subscription, over a time range you choose.
- **Subscription page** — Select a subscription to see its records and bytes behind, its oldest unread record, its consume rate, and charts of its lag and throughput.

The same metrics are available in the [GraphQL Analytics API](https://developers.cloudflare.com/analytics/graphql-api/), in four beta datasets:

- `k2ProduceAdaptiveGroups` — Bytes produced to a stream, by input (`http` or `binding`).
- `k2ConsumeAdaptiveGroups` — Bytes delivered to each subscription.
- `k2StorageAdaptiveGroups` — Bytes a stream stores, measured about every ten minutes.
- `k2SubscriptionLagAdaptiveGroups` — Records a subscription has not committed, and the age of the oldest one in milliseconds.

This query reads a stream's bytes produced by input in 5-minute buckets, and a subscription's current lag. To get a subscription's full lag, set the lag query's time range to cover the stream's whole retention period (7 days in this example). A shorter range leaves out older records the subscription has not committed. Replace `<ACCOUNT_ID>`, `<STREAM_ID>`, and `<SUBSCRIPTION_ID>` with your own values.

Bytes produced by input, and a subscription's laggraphql

```
query K2StreamMetrics {
	viewer {
		accounts(filter: { accountTag: "<ACCOUNT_ID>" }) {
			produced: k2ProduceAdaptiveGroups(
				limit: 100
				filter: {
					streamId: "<STREAM_ID>"
					datetime_geq: "2026-11-23T11:00:00Z"
					datetime_lt: "2026-11-23T12:00:00Z"
				}
				orderBy: [datetimeFiveMinutes_ASC]
			) {
				dimensions {
					input
					datetimeFiveMinutes
				}
				sum {
					bytes
				}
			}
			lag: k2SubscriptionLagAdaptiveGroups(
				limit: 1
				filter: {
					streamId: "<STREAM_ID>"
					datetime_geq: "2026-11-16T12:00:00Z"
					datetime_leq: "2026-11-23T12:00:00Z"
				}
			) {
				max(subscriptionId: "<SUBSCRIPTION_ID>") {
					records
					timeMs
				}
			}
		}
	}
}
```

Note

Queries need an [API token](https://developers.cloudflare.com/analytics/graphql-api/getting-started/authentication/api-token-auth/) with the **Account Analytics Read** permission.

Get the week’s Cloudflare changes in one email

Your email address

Free, every Monday: only what changed in Cloudflare that week. We email you a link to confirm.

[See last week’s digest](https://cloudchangelog.com/digests/weekly-2026-W47#provider-cloudflare)

[Read on developers.cloudflare.com](https://developers.cloudflare.com/changelog/post/2026-11-23-k2-metrics/)

## Related updates

- Aug 8, 2025

  [Stream - Introducing observability and metrics for Stream Live Inputs](https://cloudchangelog.com/cloudflare/2025-08-08-stream-live-observability)
- Sep 24, 2026

  [R2 bandwidth usage metrics](https://cloudchangelog.com/cloudflare/2026-09-24-r2-bandwidth-metrics)
- Oct 1, 2026

  [Cloudflare K2 durable event streaming in public beta, built on R2](https://cloudchangelog.com/cloudflare/cloudflare-blog-2026-10-01-4f45a66ba9a4)

## Contact

- [YouTube](https://www.youtube.com/@cloudchangelog)
