You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workers KV provides low-latency, high-throughput global storage to your [Cloudflare Workers](/workers/) applications. Workers KV is ideal for storing user configuration data, routing data, A/B testing configurations and authentication tokens, and is well suited for read-heavy workloads.
14
14
@@ -100,12 +100,11 @@ Create a new Worker to read and write to your KV namespace.
100
100
</TabItem> <TabItemlabel='Dashboard'>
101
101
102
102
<Steps>
103
-
1. Log in to your Cloudflare dashboard and select your account.
104
-
2. Go to [your account > **Workers & Pages** > **Overview**](https://dash.cloudflare.com/?to=/:account/workers-and-pages).
105
-
3. Select **Create**.
106
-
4. Select **Create Worker**.
107
-
5. Name your Worker. For this tutorial, name your Worker `kv-tutorial`.
2. Select the `kv-tutorial` Worker you created in [step 1](/kv/get-started/#1-create-a-worker-project).
210
-
3. Select **Settings**.
211
-
4. Scroll to **Bindings**, then select **Add**.
212
-
5. Select **KV namespace**.
213
-
6. Name your binding (`BINDING_NAME`) in **Variable name**, then select the KV namespace (`kv_tutorial_namespace`) you created in [step 2](/kv/get-started/#2-create-a-kv-namespace) from the dropdown menu.
214
-
7. Select **Deploy** to deploy your binding.
209
+
3. Got to the **Bindings** tab, then select **Add binding**.
210
+
4. Select **KV namespace** > **Add binding**.
211
+
5. Name your binding (`BINDING_NAME`) in **Variable name**, then select the KV namespace (`kv_tutorial_namespace`) you created in [step 2](/kv/get-started/#2-create-a-kv-namespace) from the dropdown menu.
4. Clear the contents of the `workers.js` file, then paste the following code.
@@ -398,7 +396,7 @@ The code above:
398
396
3. Uses JavaScript's [`try...catch`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) exception handling to catch potential errors. When writing or reading from any service, such as Workers KV or external APIs using `fetch()`, you should expect to handle exceptions explicitly.
399
397
400
398
The browser should simply return the `VALUE` corresponding to the `KEY` you have specified with the `get()` method.
401
-
2. Select **Save**.
399
+
2. Select the dropdown arrow next to **Deploy** and select **Save**.
402
400
403
401
</Steps>
404
402
@@ -426,7 +424,7 @@ Deploy your Worker to Cloudflare's global network.
Copy file name to clipboardExpand all lines: src/content/docs/kv/observability/metrics-analytics.mdx
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ sidebar:
5
5
order: 10
6
6
---
7
7
8
+
import { DashButton } from"~/components";
9
+
8
10
KV exposes analytics that allow you to inspect requests and storage across all namespaces in your account.
9
11
10
12
The metrics displayed in the [Cloudflare dashboard](https://dash.cloudflare.com/) charts are queried from Cloudflare’s [GraphQL Analytics API](/analytics/graphql-api/). You can access the metrics [programmatically](#query-via-the-graphql-api) via GraphQL or HTTP client.
@@ -24,10 +26,9 @@ Metrics can be queried (and are retained) for the past 31 days.
24
26
25
27
Per-namespace analytics for KV are available in the Cloudflare dashboard. To view current and historical metrics for a database:
26
28
27
-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
28
-
2. Go to [**Workers & Pages** > **KV**](https://dash.cloudflare.com/?to=/:account/workers/kv/namespaces).
0 commit comments