hmm.. I wonder what's wrong with mine...
hmm.. I wonder what's wrong with mine...


wrangler.toml?

kv_namespace is under d1_databasespages_build_output_dir
[placement]) or a table array declaration([[d1_databases]]), everything until the next declaration is assumed to be a part of that tabletoml for personal projectswrangler.json. It is supported for Workers, but not for Pages
Dashboard UI: You can try this one directly from the dashboard, just go to one of your KV namespaces and see the new metrics UI.
GraphQL API: You can now get your KV analytics directly from the standard GraphQL API (sample queries and how to configure your requests here: https://developers.cloudflare.com/kv/observability/metrics-analytics/)



kv_namespaced1_databases[placement][[d1_databases]]#:schema node_modules/wrangler/config-schema.json
name = "demo"
compatibility_date = "2024-09-09"
pages_build_output_dir = ".svelte-kit/cloudflare"
# Automatically place your workloads in an optimal location to minimize latency.
# If you are running back-end logic in a Pages Function, running it closer to your back-end infrastructure
# rather than the end user may result in better performance.
# Docs: https://developers.cloudflare.com/pages/functions/smart-placement/#smart-placement
[placement]
mode = "smart"
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
# Docs:
# - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
# Note: Use secrets to store sensitive data.
# - https://developers.cloudflare.com/pages/functions/bindings/#secrets
# [vars]
# MY_VARIABLE = "production_value"
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#workers-ai
# [ai]
# binding = "AI"
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#d1-databases
[[d1_databases]]
binding = "DB"
database_name = "demo"
database_id = "xxxxxxx-46f8-41c4-bad3-xxxxxxxxx"
preview_database_id="xxxxxxx-46f8-41c4-bad3-xxxxxxxxx"
migrations_dir="src/lib/server/databases/d1/migrations"# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
# Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
# [[durable_objects.bindings]]
# name = "MY_DURABLE_OBJECT"
# class_name = "MyDurableObject"
# script_name = 'my-durable-object'
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#kv-namespaces
kv_namespaces = [
{ binding = "<BINDING_NAME1>", id = "<NAMESPACE_ID1>" },
{ binding = "<BINDING_NAME2>", id = "<NAMESPACE_ID2>" }
]
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#queue-producers
# [[queues.producers]]
# binding = "MY_QUEUE"
# queue = "my-queue"