|
| 1 | +# Cloudflare Workers Mixin |
| 2 | + |
| 3 | +The Cloudflare Workers mixin is a set of configurable Grafana dashboards for monitoring Cloudflare Workers using structured logs from Cloudflare Workers Observability. |
| 4 | + |
| 5 | +The Cloudflare Workers mixin contains the following dashboard: |
| 6 | + |
| 7 | +- Cloudflare Workers |
| 8 | + |
| 9 | +## Cloudflare Workers Dashboard Overview |
| 10 | +The Cloudflare Workers dashboard provides comprehensive observability into your serverless functions deployed on Cloudflare's edge network. |
| 11 | +It leverages the rich structured metadata from Cloudflare Workers logs to deliver insights across multiple dimensions: |
| 12 | + |
| 13 | +### Key Metrics & Statistics |
| 14 | +- Request Volume: Total requests, request rate (req/sec), and unique request tracking via Ray IDs |
| 15 | +Log Severity: Breakdown of info, warning, and error logs with color-coded indicators |
| 16 | +Geographic Distribution: Unique countries, colos (edge locations), and FaaS execution regions |
| 17 | +- Client Insights: Browser types, device vendors, and unique client diversity metrics |
| 18 | + |
| 19 | +### Request Analytics |
| 20 | +- HTTP Methods: Distribution and trends of GET, POST, and other HTTP verbs |
| 21 | +- URL Paths: Endpoint-level request analysis showing which routes receive traffic |
| 22 | +- Network Protocols: HTTPS vs HTTP usage monitoring |
| 23 | +- Request Triggers: FaaS trigger type analysis (http, scheduled, etc.) |
| 24 | + |
| 25 | +### Geographic & Network Intelligence |
| 26 | +- World Map: Interactive geomap showing request distribution by country |
| 27 | +- Edge Location Analysis: Cloudflare colo distribution with heatmaps and charts |
| 28 | +- Continental Distribution: Traffic breakdown by continent (AS, EU, NA, etc.) |
| 29 | +- Timezone Analysis: Request patterns across different time zones |
| 30 | +- ISP Tracking: Autonomous System Number (ASN) distribution for network analysis |
| 31 | +- City & Region: State/province and city-level geographic breakdown |
| 32 | + |
| 33 | +### Client & Browser Analytics |
| 34 | +- Browser Distribution: Usage across Chrome, Firefox, Safari, Edge, etc. |
| 35 | +- Browser Versions: Detailed version tracking for compatibility monitoring |
| 36 | +- Rendering Engines: Blink, Gecko, WebKit distribution |
| 37 | +- Operating Systems: macOS, Windows, Linux, mobile OS breakdown |
| 38 | +- Device Vendors: Apple, Samsung, and other device manufacturer tracking |
| 39 | +- Language Preferences: Accept-Language header analysis for internationalization insights |
| 40 | +- Performance & Operations |
| 41 | +- Log Volume Trends: Time series showing log patterns by severity level |
| 42 | +- Request Rate Analysis: Temporal patterns by method, path, region, and colo |
| 43 | +- Regional Performance: FaaS execution region distribution and rates |
| 44 | +- Request Heatmaps: Time-based patterns across edge locations |
| 45 | + |
| 46 | +## Tools |
| 47 | +To use them, you need to have `mixtool` and `jsonnetfmt` installed. If you have a working Go development environment, it's easiest to run the following: |
| 48 | + |
| 49 | +```bash |
| 50 | +$ go get github.com/monitoring-mixins/mixtool/cmd/mixtool |
| 51 | +$ go get github.com/google/go-jsonnet/cmd/jsonnetfmt |
| 52 | +``` |
| 53 | + |
| 54 | +You can then build a directory `dashboard_out` with the JSON dashboard files for Grafana: |
| 55 | + |
| 56 | +```bash |
| 57 | +$ make build |
| 58 | +``` |
| 59 | + |
| 60 | +For more advanced uses of mixins, see [Prometheus Monitoring Mixins docs](https://github.com/monitoring-mixins/docs). |
0 commit comments