<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Cloudflare changelogs | K2</title><description>Cloudflare changelogs for K2</description><link>https://developers.cloudflare.com/changelog/</link><item><title>K2 - K2 metrics in the dashboard and GraphQL Analytics API</title><link>https://developers.cloudflare.com/changelog/post/2026-11-23-k2-metrics/</link><guid isPermaLink="true">https://developers.cloudflare.com/changelog/post/2026-11-23-k2-metrics/</guid><description>
&lt;p&gt;You can now monitor your &lt;a href=&quot;https://developers.cloudflare.com/k2/&quot;&gt;K2&lt;/a&gt; streams in the Cloudflare dashboard: how fast records are produced and consumed, how much each stream stores, and how far behind each subscription is.&lt;/p&gt;
&lt;img src=&quot;https://developers.cloudflare.com/cdn-cgi/image/onerror=redirect,width=1172,height=1212,format=webp/_astro/k2-stream-metrics.ClWA8K8I.png&quot; alt=&quot;A K2 stream&apos;s Metrics tab, charting bytes produced by input and bytes stored&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1172&quot; height=&quot;1212&quot;&gt;
&lt;p&gt;In the Cloudflare dashboard, go to the &lt;strong&gt;K2 Streams&lt;/strong&gt; page and select a stream.&lt;/p&gt;
&lt;a href=&quot;https://dash.cloudflare.com/?to=/:account/k2&quot; data-nb-button class=&quot;group inline-flex w-max shrink-0 items-center justify-center rounded-full font-medium whitespace-nowrap no-underline shadow-xs transition-colors cursor-pointer select-none focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary-hover h-9 gap-1.5 px-3 text-sm&quot; target=&quot;_blank&quot;&gt;
	Go to &lt;strong&gt;K2 Streams&lt;/strong&gt;&amp;nbsp;&amp;#8599;
&lt;/a&gt;
&lt;p&gt;Metrics appear in three places:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overview&lt;/strong&gt; — Produce and consume rates over the last 5 minutes, stored bytes, and each subscription&apos;s records behind, oldest unread record, lag over the last hour, and bytes consumed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Metrics&lt;/strong&gt; — Charts of bytes produced by input, bytes stored, and bytes delivered to each subscription, over a time range you choose.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Subscription page&lt;/strong&gt; — Select a subscription to see its records and bytes behind, its oldest unread record, its consume rate, and charts of its lag and throughput.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The same metrics are available in the &lt;a href=&quot;https://developers.cloudflare.com/analytics/graphql-api/&quot;&gt;GraphQL Analytics API&lt;/a&gt;, in four beta datasets:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k2ProduceAdaptiveGroups&lt;/code&gt; — Bytes produced to a stream, by input (&lt;code&gt;http&lt;/code&gt; or &lt;code&gt;binding&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k2ConsumeAdaptiveGroups&lt;/code&gt; — Bytes delivered to each subscription.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k2StorageAdaptiveGroups&lt;/code&gt; — Bytes a stream stores, measured about every ten minutes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k2SubscriptionLagAdaptiveGroups&lt;/code&gt; — Records a subscription has not committed, and the age of the oldest one in milliseconds.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This query reads a stream&apos;s bytes produced by input in 5-minute buckets, and a subscription&apos;s current lag. To get a subscription&apos;s full lag, set the lag query&apos;s time range to cover the stream&apos;s whole retention period (7 days in this example). A shorter range leaves out older records the subscription has not committed. Replace &lt;code&gt;&amp;lt;ACCOUNT_ID&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;STREAM_ID&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;SUBSCRIPTION_ID&amp;gt;&lt;/code&gt; with your own values.&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure nb-code-figure-titled&quot; data-nb-lang=&quot;graphql&quot;&gt;&lt;figcaption class=&quot;nb-code-title&quot; data-pagefind-ignore=&quot;&quot;&gt;&lt;span class=&quot;nb-code-title-name&quot;&gt;Bytes produced by input, and a subscription&apos;s lag&lt;/span&gt;&lt;span class=&quot;nb-code-title-lang&quot;&gt;graphql&lt;/span&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;graphql&quot; data-nb-lang=&quot;graphql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; K2StreamMetrics&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;	viewer&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;		accounts&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: { &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;accountTag&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;&amp;lt;ACCOUNT_ID&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; }) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;			produced&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;k2ProduceAdaptiveGroups&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;				limit&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;100&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;				filter&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;					streamId&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;&amp;lt;STREAM_ID&amp;gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;					datetime_geq&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;2026-11-23T11:00:00Z&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;					datetime_lt&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;2026-11-23T12:00:00Z&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;				}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;				orderBy&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: [&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;datetimeFiveMinutes_ASC&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;				dimensions&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;					input&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;					datetimeFiveMinutes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;				}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;				sum&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;					bytes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;				}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;			lag&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;k2SubscriptionLagAdaptiveGroups&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;				limit&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;				filter&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;					streamId&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;&amp;lt;STREAM_ID&amp;gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;					datetime_geq&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;2026-11-16T12:00:00Z&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;					datetime_leq&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;2026-11-23T12:00:00Z&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;				}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;				max&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;subscriptionId&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;&amp;lt;SUBSCRIPTION_ID&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;					records&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;					timeMs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;				}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;aside role=&quot;note&quot; aria-label=&quot;Note&quot; class=&quot;aside-card flex items-start gap-3 rounded-lg px-4 py-3 my-4&quot; style=&quot;--_c: var(--nb-info); --_t: var(--nb-info-muted);&quot; data-astro-cid-znle5jil&gt;&lt;span class=&quot;flex h-[1.375em] shrink-0 items-center&quot; aria-hidden=&quot;true&quot; data-astro-cid-znle5jil&gt;&lt;svg width=&quot;1em&quot; height=&quot;1em&quot; viewBox=&quot;0 0 256 256&quot; class=&quot;h-[1em] w-[1em]&quot; data-astro-cid-znle5jil=&quot;true&quot; data-icon=&quot;ph:info&quot;&gt;&lt;path fill=&quot;currentColor&quot; d=&quot;M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m16-40a8 8 0 0 1-8 8a16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16a16 16 0 0 1 16 16v40a8 8 0 0 1 8 8m-32-92a12 12 0 1 1 12 12a12 12 0 0 1-12-12&quot;/&gt;&lt;/svg&gt;&lt;/span&gt;&lt;div class=&quot;flex min-w-0 flex-1 flex-col gap-0.5&quot; data-astro-cid-znle5jil&gt;&lt;p class=&quot;m-0 text-base leading-snug font-semibold&quot; data-astro-cid-znle5jil&gt;Note&lt;/p&gt;&lt;div class=&quot;aside-card-body text-sm leading-normal&quot; data-astro-cid-znle5jil&gt;&lt;p&gt;Queries need an &lt;a href=&quot;https://developers.cloudflare.com/analytics/graphql-api/getting-started/authentication/api-token-auth/&quot;&gt;API token&lt;/a&gt; with the &lt;strong&gt;Account Analytics Read&lt;/strong&gt; permission.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/aside&gt;</description><pubDate>Mon, 23 Nov 2026 00:00:00 GMT</pubDate><product>K2</product><category>K2</category></item></channel></rss>