The tree was a debranded snapshot of upstream taken around 2026-02-20, and upstream has moved about five months since. This replaces it with upstream master, mechanically re-derived: bin/debrand does the rename, and the pipeline and squashed migrations are restored from the shipped tree. Not a merge. The previous import replaced the tree wholesale in a single commit, so there is no shared content history to merge against. Reproducing the rename on the new tree is what actually converges. What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md, and insights/migrations. The squashed initial migration is load-bearing — the live database records it by name, so upstream's ~918 individual migrations cannot come back. Nine products are dropped as unreferenced. Twenty-one more that we do not run are kept anyway because the core app still imports them; unpicking those is a refactor and does not belong in a rebase. This base does not build yet, and the reasons are not in the rename: upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against our 4.2, and the dependency manifests still name upstream packages that we republish under our own names. Those are decisions, not renames.
3.1 KiB
Span counts over time — a zero-filled time series for trend and spike analysis.
Returns one row per (time bucket, service) pair:
time— ISO 8601 bucket start (UTC)service— service name (top 10 services per bucket)count— spans in that bucket matching the filters
Buckets are sized adaptively to the window (roughly 50 buckets regardless of range, e.g. -1h → ~minute buckets, -7d → ~hour buckets). Quiet stretches return zero-count rows, so the series is continuous — read spike timing straight off the time values.
Use to answer:
- "When did the error rate spike?" (see the error-trend workflow below)
- "Is traffic to service X growing, flat, or bursty?"
- "Did span volume change after the deploy at 14:00?"
- "Which time window should I zoom into before pulling raw spans?"
For a single aggregate number per operation, use apm-spans-aggregate instead. For latency distribution, use apm-spans-duration-histogram.
All parameters must be nested inside a query object.
Error-trend workflow
Two calls, then divide per bucket:
apm-spans-sparklinewith your filters → total counts per bucket.- The same call with
statusCodes: [2]added → error counts per bucket.
Error rate per bucket = errors / total. The bucket where the ratio jumps is when the spike started.
Parameters
All parameters go inside query.
query.dateRange
Date range for the series. Defaults to the last hour.
date_from: Start of the range. ISO 8601 or relative:-1h,-6h,-1d,-7d.date_to: End of the range. Same format. Omit or null for "now".
query.serviceNames
List of service names to restrict the series to. Use apm-services-list to discover services.
query.statusCodes
Filter by OTel span status codes (list of integers: 0 Unset, 1 OK, 2 Error) — not HTTP status codes. Use [2] to select error spans.
query.filterGroup
Property filters applied to the counted spans. Same filter shape and operators as query-apm-spans:
span— built-in span fields (trace_id, span_id, duration, name, kind, status_code, is_root_span)span_attribute— span-level attributesspan_resource_attribute— resource-level attributes
Examples
Span volume per service over the last 6 hours
{
"query": {
"dateRange": { "date_from": "-6h" }
}
}
Error spans only, one service, last day
{
"query": {
"serviceNames": ["api-gateway"],
"statusCodes": [2],
"dateRange": { "date_from": "-1d" }
}
}
Request (root span) volume trend
{
"query": {
"filterGroup": [{ "key": "is_root_span", "operator": "exact", "type": "span", "value": true }],
"dateRange": { "date_from": "-1d" }
}
}
Reminders
- Counts are spans, not traces — filter
is_root_span = trueto count requests/traces. - Zero-count rows are bucket filler; read non-zero rows for activity and zero rows for gaps.
- Only the top 10 services per bucket are returned — narrow with
serviceNameswhen a busy project drowns out the service you care about. - Use
apm-services-list,apm-attributes-list,apm-attribute-values-listto discover values before filtering.