{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 1, "links": [], "panels": [ { "id": 1, "type": "row", "title": "Overview", "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "panels": [] }, { "id": 2, "type": "stat", "title": "Requests (24h)", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "short", "noValue": "0" }, "overrides": [] }, "targets": [ { "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "editorMode": "code", "expr": "sum(sum_over_time(max_over_time(cf_pages_functions_invocations_requests{script_name=~\"$script_name\"}[1m])[24h:1m]))", "instant": true, "range": false, "legendFormat": "__auto", "refId": "A" } ], "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, { "id": 3, "type": "stat", "title": "Errors (24h)", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "gridPos": { "h": 4, "w": 4, "x": 4, "y": 1 }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "short", "noValue": "0" }, "overrides": [] }, "targets": [ { "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "editorMode": "code", "expr": "sum(sum_over_time(max_over_time(cf_pages_functions_invocations_errors{script_name=~\"$script_name\"}[1m])[24h:1m]))", "instant": true, "range": false, "legendFormat": "__auto", "refId": "A" } ], "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, { "id": 4, "type": "stat", "title": "CPU p99", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "gridPos": { "h": 4, "w": 4, "x": 8, "y": 1 }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "µs", "noValue": "0" }, "overrides": [] }, "targets": [ { "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "editorMode": "code", "expr": "max(cf_pages_functions_invocations_cpu_time_us_p99{script_name=~\"$script_name\"})", "instant": true, "range": false, "legendFormat": "__auto", "refId": "A" } ], "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, { "id": 5, "type": "stat", "title": "Duration p99", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "gridPos": { "h": 4, "w": 4, "x": 12, "y": 1 }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "ms", "noValue": "0" }, "overrides": [] }, "targets": [ { "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "editorMode": "code", "expr": "max(cf_pages_functions_invocations_duration_ms_p99{script_name=~\"$script_name\"})", "instant": true, "range": false, "legendFormat": "__auto", "refId": "A" } ], "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, { "id": 6, "type": "row", "title": "Traffic", "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 }, "panels": [] }, { "id": 7, "type": "timeseries", "title": "Requests per Script", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "short", "custom": { "drawStyle": "line", "lineInterpolation": "smooth", "lineWidth": 1, "fillOpacity": 10, "gradientMode": "none", "spanNulls": true, "showPoints": "never", "pointSize": 5, "stacking": { "mode": "none", "group": "A" }, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } } }, "overrides": [] }, "targets": [ { "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "editorMode": "code", "expr": "sum by (script_name) (max_over_time(cf_pages_functions_invocations_requests{script_name=~\"$script_name\"}[1m]))", "instant": false, "range": true, "legendFormat": "{{script_name}}", "refId": "A" } ], "options": { "legend": { "calcs": [ "mean", "max", "lastNotNull" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 8, "type": "timeseries", "title": "Errors per Script", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "short", "custom": { "drawStyle": "line", "lineInterpolation": "smooth", "lineWidth": 1, "fillOpacity": 10, "gradientMode": "none", "spanNulls": false, "showPoints": "never", "pointSize": 5, "stacking": { "mode": "none", "group": "A" }, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } } }, "overrides": [] }, "targets": [ { "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "editorMode": "code", "expr": "sum by (script_name) (max_over_time(cf_pages_functions_invocations_errors{script_name=~\"$script_name\"}[1m]))", "instant": false, "range": true, "legendFormat": "{{script_name}}", "refId": "A" } ], "options": { "legend": { "calcs": [ "mean", "max", "lastNotNull" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 9, "type": "row", "title": "Performance", "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 }, "panels": [] }, { "id": 10, "type": "timeseries", "title": "CPU p99", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 15 }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "µs", "custom": { "drawStyle": "line", "lineInterpolation": "smooth", "lineWidth": 1, "fillOpacity": 10, "gradientMode": "none", "spanNulls": true, "showPoints": "never", "pointSize": 5, "stacking": { "mode": "none", "group": "A" }, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } } }, "overrides": [] }, "targets": [ { "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "editorMode": "code", "expr": "max by (script_name) (max_over_time(cf_pages_functions_invocations_cpu_time_us_p99{script_name=~\"$script_name\"}[1m]))", "instant": false, "range": true, "legendFormat": "{{script_name}}", "refId": "A" } ], "options": { "legend": { "calcs": [ "mean", "max", "lastNotNull" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 11, "type": "timeseries", "title": "Duration p99", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 15 }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "ms", "custom": { "drawStyle": "line", "lineInterpolation": "smooth", "lineWidth": 1, "fillOpacity": 10, "gradientMode": "none", "spanNulls": true, "showPoints": "never", "pointSize": 5, "stacking": { "mode": "none", "group": "A" }, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } } }, "overrides": [] }, "targets": [ { "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "editorMode": "code", "expr": "max by (script_name) (max_over_time(cf_pages_functions_invocations_duration_ms_p99{script_name=~\"$script_name\"}[1m]))", "instant": false, "range": true, "legendFormat": "{{script_name}}", "refId": "A" } ], "options": { "legend": { "calcs": [ "mean", "max", "lastNotNull" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } } ], "tags": [ "cloudflare-workers", "cloudflare-metrics", "cloudflare-analytics" ], "templating": { "list": [ { "name": "script_name", "label": "Script", "type": "query", "datasource": { "type": "prometheus", "uid": "36979063-5384-4eb9-8679-565a727cbc13" }, "query": { "query": "label_values(cf_pages_functions_invocations_requests, script_name)", "refId": "StandardVariableQuery" }, "refresh": 2, "regex": "", "sort": 1, "includeAll": true, "allValue": ".*", "multi": true, "hide": 0, "definition": "label_values(cf_pages_functions_invocations_requests, script_name)", "options": [], "skipUrlSync": false, "current": { "selected": false, "text": "All", "value": "$__all" } } ] }, "time": { "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Cloudflare — Pages Functions", "uid": "cf-pages-functions", "version": 1, "weekStart": "" }