references/observability/api.md
Observability APIs
Fetch the applicable reference for current signatures, field locations, units, authentication, and query syntax. Do not infer the Tail event schema from an OpenTelemetry span or a Logpush record.
| Task | Maintained documentation |
| --- | --- |
| Emit console messages and check supported methods | Console API |
| Filter, group, and aggregate stored Workers Logs | Query Builder |
| Query built-in Workers metrics with GraphQL | Querying Workers metrics |
| Define Analytics Engine fields and call writeDataPoint() | Write data points |
| Authenticate and query Analytics Engine datasets | SQL API |
| Calculate counts, sums, and averages on sampled events | Analytics Engine sampling |
| Implement a Tail consumer and inspect event properties | Tail handler API |
| Create and manage Logpush jobs | Logpush API configuration |
| Select exported Workers event fields | Workers Trace Events dataset |
| Export OTLP logs and traces | OpenTelemetry export |
Keep dataset field meanings and units consistent between writers and queries. Follow the SQL reference linked from the SQL API for supported date bucketing and aggregate functions; do not assume another SQL dialect's syntax works here. Account for sampling in averages as well as counts and sums.
See configuration.md for setup and patterns.md for application-level decisions.