wbin90620 and Claude Opus 5.5
0bc4d684e7
feat(trace): every inference span and usage row names its runtime digest and KV cache connector
...
hanzo-inc/cloud#800 . A serving node (or the router in front of it) states the
runtime that answered as X-Hanzo-Runtime-Digest and X-Hanzo-Cache-Connector, on
the response head or in the trailer of a stream. ai reads both into the usage
record and writes them on every gen_ai span (gen_ai.hanzo.runtime.digest,
gen_ai.hanzo.kv_cache.connector) and every hanzo.cloud_usage row
(runtime_digest, cache_connector). Neither is relayed to the caller.
The new leaf package provenance is the one rule for what is recorded:
- a digest is `<algo>:<hex>` for sha256/sha384/sha512/blake3, or the digest
of an image reference pinned by one (`repo@sha256:...`, registry dropped);
a tag, a path or anything malformed is "unknown";
- a connector is one name from a closed vocabulary (in-memory, cpu-offload,
disk-offload, external:<lmcache|mooncake|nixl|p2p-nccl|redis|s3|valkey|
kv-fabric>, external:other); vLLM connector class names map onto it, a URL
keeps its scheme alone, so no host, path or credential reaches a trace;
- a node that states nothing reads "unknown", on the span and the row alike,
so both attributes are on every span and a filter for either is one lookup.
The columns are added with DEFAULT 'unknown' (DDL and migration), so rows
written before them, and the subset inserts (DO backfill, cloud's OpenRouter
import), read "unknown" too. ServedUsage carries both for a host that serves a
model in process (TraceServedUsage).
Testing: go test ./provenance ./object ./controllers ./routers (new:
TestTheServingRuntimeIsReadAndNeverRelayed, TestEverySpanAndRowNamesTheRuntime,
plus the provenance package's digest/connector/idempotence tests).
Risk: low. Two String columns with defaults on the usage table (ADD COLUMN IF
NOT EXISTS); values are normalised before any write. Billing is untouched.
How to revert: revert this commit; the columns can stay (they default to
'unknown' and nothing else reads them).
Co-Authored-By: Claude Opus 5.5 <[email protected] >
2026-11-18 19:53:03 -08:00
..
2026-09-17 01:01:10 -07:00
2026-11-13 14:06:21 -08:00
2026-10-18 22:21:42 -07:00
2026-10-18 22:21:42 -07:00
2026-07-26 21:00:50 -07:00
2026-08-24 01:42:48 +00:00
2026-08-03 09:43:12 -07:00
2026-08-23 02:10:55 +00:00
2026-07-02 13:02:21 -07:00
2026-08-23 13:50:59 +00:00
2026-10-17 03:55:09 -07:00
2026-07-16 09:57:36 -07:00
2026-10-04 21:58:34 -07:00
2026-08-23 22:14:54 +00:00
2026-08-23 22:14:54 +00:00
2026-08-23 22:14:54 +00:00
2026-11-13 13:58:01 -08:00
2026-10-09 14:08:38 -07:00
2026-10-09 14:08:38 -07:00
2026-11-08 15:40:14 -08:00
2026-11-08 15:40:14 -08:00
2026-07-26 08:45:34 -07:00
2026-07-22 15:51:35 -07:00
2026-07-26 08:45:34 -07:00
2026-10-18 21:46:32 -07:00
2026-10-05 03:08:44 -07:00
2026-08-24 09:37:51 +00:00
2026-08-23 19:35:29 +00:00
2026-08-24 09:37:51 +00:00
2026-08-23 20:12:27 +00:00
2026-09-17 01:01:10 -07:00
2026-09-17 01:01:10 -07:00
2026-07-02 13:02:21 -07:00
2026-09-17 01:01:10 -07:00
2026-07-26 21:00:50 -07:00
2026-08-13 13:20:08 -07:00
2026-09-23 13:08:18 -07:00
2026-11-18 19:53:03 -08:00
2026-11-08 15:40:14 -08:00
2026-10-09 14:13:13 -07:00
2026-08-24 05:23:36 +00:00
2026-10-04 09:31:48 -07:00
2026-08-04 17:07:32 -07:00
2026-09-17 01:01:10 -07:00
2026-10-18 22:21:42 -07:00
2026-07-28 13:42:29 -07:00
2026-08-23 23:02:29 +00:00
2026-08-04 17:07:32 -07:00
2026-09-17 01:01:10 -07:00
2026-08-23 20:42:55 +00:00
2026-08-23 20:42:55 +00:00
2026-07-11 21:58:43 -07:00
2026-09-17 01:01:10 -07:00
2026-09-17 01:01:10 -07:00
2026-08-23 22:08:35 +00:00
2026-08-02 13:40:28 -07:00
2026-07-01 16:51:06 -07:00
2026-07-01 16:51:06 -07:00
2026-08-04 18:23:34 -07:00
2026-08-21 02:22:26 +00:00
2026-08-21 02:22:26 +00:00
2026-10-09 02:47:33 -07:00
2026-09-17 01:01:10 -07:00
2026-08-23 21:55:40 +00:00
2026-09-17 01:01:10 -07:00
2026-06-29 23:37:11 -07:00
2026-08-23 23:02:29 +00:00
2026-09-17 01:01:10 -07:00
2026-08-23 23:02:29 +00:00
2026-08-23 02:10:55 +00:00
2026-11-01 06:28:12 -08:00
2026-11-01 06:28:12 -08:00
2026-08-23 20:18:52 +00:00
2026-07-16 15:18:31 -07:00
2026-10-18 22:21:43 -07:00
2026-10-18 22:21:43 -07:00
2026-11-09 04:15:19 -05:00
2026-11-09 04:15:19 -05:00
2026-08-23 02:10:55 +00:00
2026-07-03 15:20:02 -07:00
2026-08-20 16:51:57 -07:00
2026-07-17 15:46:24 -07:00
2026-10-09 02:10:58 -07:00
2026-08-24 08:18:31 +00:00
2026-09-17 01:01:10 -07:00
2026-09-17 01:01:10 -07:00
2026-09-17 01:01:10 -07:00
2026-09-17 01:01:10 -07:00
2026-09-17 01:01:10 -07:00
2026-10-09 14:13:13 -07:00
2026-10-18 10:44:15 -07:00
2026-09-30 08:37:06 -07:00
2026-10-08 19:16:56 -07:00
2026-08-20 16:51:57 -07:00
2026-08-23 20:18:52 +00:00
2026-08-23 19:35:29 +00:00
2026-10-18 22:21:43 -07:00
2026-10-17 03:55:09 -07:00
2026-09-02 16:46:21 -07:00
2026-09-17 01:01:10 -07:00
2026-08-23 00:56:14 +00:00
2026-09-17 01:01:10 -07:00
2026-08-23 20:42:55 +00:00
2026-08-04 18:23:34 -07:00
2026-08-24 08:18:31 +00:00
2026-07-02 13:02:21 -07:00
2026-08-06 14:15:48 -07:00
2026-08-16 18:09:12 -07:00
2026-11-01 16:23:23 -08:00
2026-08-23 23:02:29 +00:00
2026-08-27 07:27:52 -07:00
2026-08-27 07:27:52 -07:00
2026-08-04 18:23:34 -07:00
2026-08-23 13:50:59 +00:00
2026-07-19 13:10:53 -07:00
2026-09-17 01:01:10 -07:00
2026-09-29 13:51:32 -07:00
2026-08-04 18:23:34 -07:00
2026-08-13 13:20:08 -07:00
2026-08-13 13:20:08 -07:00
2026-09-28 11:58:33 -07:00
2026-10-15 18:49:31 -07:00
2026-10-15 18:49:31 -07:00
2026-07-04 19:22:38 -07:00
2026-07-04 19:22:38 -07:00
2026-07-04 19:22:38 -07:00
2026-07-03 01:07:42 -07:00
2026-10-18 22:21:43 -07:00
2026-08-14 17:18:31 -07:00
2026-10-18 22:21:43 -07:00
2026-08-03 17:28:39 -07:00
2026-08-27 01:25:30 +00:00
2026-08-22 22:41:49 +00:00
2026-10-18 10:44:15 -07:00
2026-08-27 01:25:30 +00:00
2026-09-17 01:01:10 -07:00
2026-10-18 22:21:42 -07:00
2026-09-17 01:01:10 -07:00
2026-11-09 04:15:19 -05:00
2026-08-23 19:35:29 +00:00
2026-08-16 10:18:35 -07:00
2026-09-29 21:49:03 -07:00
2026-08-04 18:23:34 -07:00
2026-11-09 04:15:19 -05:00
2026-08-23 20:18:52 +00:00
2026-08-02 13:40:28 -07:00
2026-09-17 01:01:10 -07:00
2026-08-20 17:46:30 -07:00
2026-08-23 22:14:54 +00:00
2026-07-21 14:43:37 -07:00
2026-08-23 23:02:29 +00:00
2026-07-16 20:07:52 -07:00
2026-08-23 23:02:29 +00:00
2026-07-15 23:40:25 -07:00
2026-09-17 01:01:10 -07:00
2026-10-16 18:37:37 -07:00
2026-08-23 02:10:55 +00:00
2026-07-02 13:02:21 -07:00
2026-08-23 20:42:55 +00:00
2026-08-23 13:50:59 +00:00
2026-11-13 14:06:21 -08:00
2026-11-13 13:58:01 -08:00
2026-10-18 22:21:42 -07:00
2026-10-18 22:21:42 -07:00
2026-08-27 01:26:21 +00:00
2026-07-02 13:02:21 -07:00
2026-09-17 01:01:10 -07:00
2026-07-02 13:02:21 -07:00
2026-09-17 01:01:10 -07:00
2026-07-02 13:02:21 -07:00
2026-08-23 02:10:55 +00:00
2026-08-23 20:42:55 +00:00
2026-08-23 18:33:06 +00:00
2026-07-02 13:02:21 -07:00
2026-10-18 22:21:42 -07:00
2026-08-31 02:53:54 +00:00
2026-09-17 01:01:10 -07:00
2026-08-04 18:23:34 -07:00
2026-09-17 01:01:10 -07:00
2026-09-17 01:01:10 -07:00
2026-10-18 22:21:43 -07:00
2026-10-16 22:51:47 -07:00
2026-08-23 22:03:53 +00:00
2026-09-17 01:01:10 -07:00
2026-08-23 01:33:19 +00:00
2026-07-10 17:45:02 -07:00
2026-07-26 21:00:50 -07:00
2026-09-17 01:01:10 -07:00
2026-11-13 13:58:01 -08:00
2026-08-23 00:56:14 +00:00
2026-08-21 02:22:26 +00:00
2026-08-21 02:22:26 +00:00
2026-09-17 01:01:10 -07:00
2026-07-17 15:46:24 -07:00
2026-08-23 20:12:27 +00:00
2026-08-23 20:12:27 +00:00
2026-08-24 11:47:33 +00:00
2026-08-24 11:47:33 +00:00
2026-08-24 11:47:33 +00:00
2026-08-24 11:47:33 +00:00
2026-09-17 01:01:10 -07:00
2026-11-13 13:58:01 -08:00
2026-08-02 21:27:29 -07:00
2026-09-17 01:01:10 -07:00
2026-08-04 18:23:34 -07:00
2026-08-24 08:18:31 +00:00
2026-08-04 18:23:34 -07:00
2026-07-17 15:46:24 -07:00
2026-07-02 13:02:21 -07:00
2026-07-17 15:46:24 -07:00
2026-07-02 13:02:21 -07:00
2026-09-17 01:01:10 -07:00
2026-08-24 11:47:33 +00:00
2026-08-23 02:10:55 +00:00
2026-08-22 22:41:49 +00:00
2026-09-17 01:01:10 -07:00