Appearance
Derived Metrics
Beta
Derived metrics are in beta, on paid plans. Limits are subject to change.
A derived metric counts or measures records as they arrive and writes the result as a real metric: error logs per service per minute, the p95 of a span's duration, revenue summed from checkout events. Once written, a derived metric works like any metric sent over OpenTelemetry: chart under Metrics, add to a dashboard, and alert with a telemetry monitor.
Querying a metric is far cheaper than scanning raw logs, so a derived metric is the right home for anything viewed often or kept for longer.
Create one
Open Manage Streams, pick a Stream and go to Derived Metrics → New Metric. While editing, the preview shows the series the metric would write over the last hours, from real data, before anything is saved.
| Setting | |
|---|---|
| Metric name | How it appears in Metrics, charts and monitors, e.g. checkout.errors. It can't be renamed later. |
| From | Logs or traces (OpenTelemetry Streams), or events (Events Streams), and a search choosing which records count. |
| Measure | See the table below. |
| One series per | Up to four fields; each becomes a tag on the metric. |
| Bucket | 10 seconds to 1 hour per point. |
| Lag | Stay this far behind now so late records land first (default 60 s). |
| Run every | How often it catches up (the plan sets a 1 minute floor). |
| Backfill | Hours of history to write when it's created (up to 7 days). |
| Measure | Writes | Read it as |
|---|---|---|
| Count | a counter of matching records | increase or rate |
| Sum of a field | a counter | increase or rate |
| Distribution of a field | a histogram | p50 to p99, avg, count |
| Average, Min, Max of a field | a gauge | avg, min, max |
RED metrics
An OpenTelemetry Stream can add the three standard service metrics in one click, Add RED Metrics: requests, errors and duration from server spans, per service and operation.
Keeping it right
- Each metric shows how far behind now it is and its last run. Expand it for the run log and live runs.
- Run Now catches up straight away instead of waiting for the next run.
- Changing what a metric measures (its search, measure, grouping or bucket) starts the metric over: every written point is removed, and the chosen hours are recomputed with the new definition. Editing only its description, lag or schedule keeps its points.
- Rebuild recomputes the last 24 hours from the records, picking up anything that arrived late. Older points stay as they are. A metric can be rebuilt once every 30 minutes.
- One run at a time works on a metric, and a retried run never counts a record twice.
- Delete removes the points it wrote.
Limits
| Plan | Derived metrics |
|---|---|
| Hobby | 5 |
| Pro, Founders | 25 |
| Team | 200 |
| Enterprise | 1,000 |
API
Everything here is in the API's telemetry derivedMetrics resource (and the CLI):
list | A namespace's (or a Stream's) derived metrics |
create, update, delete | Manage them |
preview | The series a definition would write, without saving |
runNow, rebuild | Catch up now (once every 15 seconds), or rewrite from a point (once every 30 minutes) |
runs | Its materialization runs |
red | Add the RED metrics to an OpenTelemetry Stream |