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
Copy file name to clipboardExpand all lines: src/content/docs/workflows/observability/metrics-analytics.mdx
+48-9Lines changed: 48 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,63 @@ sidebar:
6
6
7
7
---
8
8
9
-
D1 exposes database analytics that allow you to inspect query volume, query latency, and storage size across all and/or each database in your account.
9
+
Workflows exposes metrics that allow you to inspect and measure Workflow execution, error rates, steps and total duration across each (and all) of your Workflows.
10
10
11
11
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.
| Read Queries (qps) |`readQueries`| The number of read queries issued against a database. This is the raw number of read queries, and is not used for billing. |
20
-
| Write Queries (qps) |`writeQueries`| The number of write queries issued against a database. This is the raw number of write queries, and is not used for billing. |
21
-
| Rows read (count) |`rowsRead`| The number of rows read (scanned) across your queries. See [Pricing](/d1/platform/pricing/) for more details on how rows are counted. |
22
-
| Rows written (count) |`rowsWritten`| The number of rows written across your queries. |
23
-
| Query Response (bytes) |`queryBatchResponseBytes`| The total response size of the serialized query response, including any/all column names, rows and metadata. Reported in bytes. |
24
-
| Query Latency (ms) |`queryBatchTimeMs`| The total query response time, including response serialization, on the server-side. Reported in milliseconds. |
25
-
| Storage (Bytes) |`databaseSizeBytes`| Maximum size of a database. Reported in bytes. |
26
20
27
21
Metrics can be queried (and are retained) for the past 31 days.
28
22
29
-
### Row count
23
+
## View metrics in the dashboard
24
+
25
+
Per-Workflow and instance analytics for Workflows are available in the Cloudflare dashboard. To view current and historical metrics for a database:
26
+
27
+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
28
+
2. Go to [**Workers & Pages** > **Workflows**](https://dash.cloudflare.com/?to=/:account/workers/workflows).
29
+
3. Select a Workflow to view its metrics.
30
+
31
+
You can optionally select a time window to query. This defaults to the last 24 hours.
32
+
33
+
## Query via the GraphQL API
34
+
35
+
You can programmatically query analytics for your Workflows via the [GraphQL Analytics API](/analytics/graphql-api/). This API queries the same datasets as the Cloudflare dashboard, and supports GraphQL [introspection](/analytics/graphql-api/features/discovery/introspection/).
36
+
37
+
Workflows GraphQL datasets require an `accountTag` filter with your Cloudflare account ID and includes the `workflowsAdaptive` and `workflowsAdaptiveGroups` datasets.
38
+
39
+
### Examples
40
+
41
+
To query the sum of `readQueries`, `writeQueries` for a given `$databaseId`, grouping by `databaseId` and `date`:
0 commit comments