Skip to content

Latest commit

 

History

History
154 lines (132 loc) · 62.4 KB

CHANGELOG.md

File metadata and controls

154 lines (132 loc) · 62.4 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Added

  • Paperclip agents are attributed by paperclip.agent.id (ADR-0029). Each actor gets an optional Paperclip agent id (schema v13; the actor page, or PATCH /api/v1/actors/{id} with {"paperclip_agent_id"}), and a span authorized by an ingest key with no actor token is attributed to the actor whose id matches the paperclip.agent.id Paperclip puts on every agent span - from the resource attributes, else the span's. Paperclip's company observability then needs only the ingest key, and agents on remote machines are covered too. The ADR-0028 helper route could not reach agents: Paperclip runs them through the Claude Agent SDK with --setting-sources=project,local, so they never read the user settings.json the helper is registered in, and putting the helper in managed settings makes Claude Code drop the endpoint Paperclip sets. The attribute is honoured only behind an ingest key, so an unauthenticated sender cannot claim an agent; an actor token still wins; lookups are memoized per request
  • Ingest keys: one shared key authorizes, each sender's actor token identifies (ADR-0028). Paperclip now strips every OTEL_* and CLAUDE_CODE_*TELEMETRY* variable from an agent's env and applies one company-wide set of OTLP headers, so a per-agent Authorization: Bearer <actor token> can no longer be configured, and with that setting empty it turns telemetry off, which is why agent telemetry stopped on 2026-11-07. An ingest key (cotel_ik_<64 hex>, created, copied and revoked under Setup → Settings → Ingest keys, stored in plaintext like actor tokens) authorizes OTLP ingest and nothing else, never export/import or the dashboard; the existing actor token, unchanged and not reissued, rides next to it in X-Cotel-Actor-Token. A valid key with a missing or unknown actor token is accepted as Anonymous even when allow-anonymous is off, because the request was authorized; X-Cotel-Actor-Token without a bearer never identifies anyone, and a bearer actor token works exactly as before. Schema v12 adds ingest_keys; the dashboard API gains GET/POST /api/v1/ingest-keys and DELETE /api/v1/ingest-keys/{id}. POST /v1/logs accepts and discards OTLP logs (200 {}), so Paperclip's log exporter stops getting 404. scripts/otel-headers-helper.py is a Claude Code otelHeadersHelper that prints the complete header set — OTEL_EXPORTER_OTLP_HEADERS overlaid with OTEL_EXPORTER_OTLP_TRACES_HEADERS, plus X-Cotel-Actor-Token from COTEL_ACTOR_TOKEN — and always exits 0 with one JSON object, since a failing helper stops Claude Code's exports. Docs → Actors and Authentication
  • cotel --backfill-cost (dry run) and --backfill-cost-apply recompute cost_usd for every span of a priced model from its stored token counts at today's rates, revived from the closed PR #67 as reviewed there (FLO-551/552). Spans with an unknown or empty model are counted and left alone; daily_usage is not touched, because a day rolled up after the backfill derives its cost from the corrected spans. The apply needs the database to itself, so it runs while the server is stopped; the dry run restores the newest snapshot into a throwaway file instead of copying a live one. README → Maintenance commands has both procedures for the current compose deploy, with --entrypoint set so a one-off does not start a second Cloudflare tunnel connector
  • A synthetic reproducer for the ART-index corruption that took production down in September 2026: TestARTIndexSurvivesAddedColumnAndBulkReplace in internal/storage/art_repro_test.go, built from the schema with no production bytes — every value is derived from the row number, so it carries no user id, session id or span attribute that belonged to anyone. It rebuilds the trigger rather than a statement from it: spans as it stood at schema version 2 — without user_id, and with the mid-table duration_ms generated column, so that the one ALTER production ran on a long-lived filled table (v9 → v10, six weeks before the abort) runs here too instead of passing over a column the fixture never had, and so the indexes are built over the logical/physical column skew they were built over in production — with that era's three ART indexes, filled across the 30-day retention boundary; storage.Open then runs the real schema.sql, which adds user_id VARCHAR to the filled indexed table and puts idx_spans_user_id on that added column; a bulk UPDATE writes the column, cotel's own retention roll-up supplies the large replace transaction (the INSERT INTO daily_usage and the DELETE FROM spans are one transaction, so it is the real mutation and not an imitation); then checkpoint, close, reopen, checkpoint, ingest more, repeat. The repetition is the point — the damage accumulates and production ran for weeks after its migration before an open aborted — and so is the restart: this class of fault is only ever reported by the checkpoint that folds the index or the open that reads it back. Each pass asserts that duration_ms was there before the migration and is gone after it (a DROP COLUMN IF EXISTS that no-ops must not be able to come back unnoticed), that the reopen succeeds, that both checkpoints fold — a present-but-empty .wal counts as folded, so an engine that truncates rather than unlinks is not reported as this defect — that all four indexes survive, that a bare user_id = <constant> folded into the scan agrees with the same predicate wrapped in an expression, which is not, and that re-inserting a stored span_id is still rejected while an unused one is accepted. The last two are the silent form of the damage: a wrong answer rather than an error. They are phrased that way because no SELECT over spans is planned as an ART index scan on this engine — measured, including on the primary key and on a textbook unique match with the thresholds raised — so an “indexed probe agrees with an unindexed probe” assertion would have been two sequential scans agreeing; the pushdown pair is what ADR-0013's wrong answers actually came out of, and unique-constraint enforcement is the one path that provably traverses an ART index. It runs in the ordinary test set rather than behind a build tag, because the moment it most needs to run is a driver or engine bump and that is exactly when an optional test is forgotten; COTEL_ART_REPRO_SPANS and COTEL_ART_REPRO_CYCLES scale it past the defaults (20 000 spans, 2 cycles, 4.1 s). Against the engine the tree links today — duckdb-go/v2 v2.10506.0, SELECT version() → v1.5.6 — it did not reproduce, at the defaults or at 200 000 spans over 6 cycles. That measures the half of the forensic volume's release condition that was previously unevaluable, and measures it negative rather than exonerating: upstream reports the same class of fault on 1.5.5 against a ~19 GB database, the file that was damaged here took weeks of ingest to get there, and two clean runs at our scale are not absence (docs/operations/duckdb-recovery.md)

Changed

  • A failed tool call no longer marks a session as an error. GET /api/v1/sessions reported status: "error" when any span of the session had errored. An agent's shell commands exit non-zero in the normal course of work, so 96 of the 159 production sessions that used a tool read as failed, with a median of two failed calls out of 43 for one agent. A session is now an error only when a span that is not a tool call errored, which for Claude Code means a failed LLM request; on the same data that leaves 7. Tool spans are every claude_code.tool* span and any span that carries a tool_name. The row gains failed_tool_calls, and the Sessions page shows it next to the tool count. Span statuses on the session page are unchanged.
  • Codex spans without a session are dropped at ingest (ADR-0030). Codex exports every internal tracing span. Two short runs sent 31,373 spans, of which the 207 that carry a session were the only ones any page showed. Sessions, tokens, cost and tool calls are unchanged. The ingest log reports the dropped count at most once a minute. cotel --purge-dropped (dry run) and --purge-dropped-apply delete such spans that were stored before the rule.
  • Database snapshots are taken once a day and fourteen are kept (COTEL_SNAPSHOT_INTERVAL=24h, COTEL_SNAPSHOT_KEEP=14), down from every six hours with 56 kept. Reach stays fourteen days; a restore now loses up to a day of telemetry instead of six hours, for about a quarter of the disk. The probe's SNAPSHOT_STALE_AFTER_SECONDS default moves from 12 h to 48 h with it, so a healthy daily worker does not read as stale (ADR-0023 amendment)
  • Users are now actors, down to the schema (ADR-0027). What a token belongs to was never only a person: production holds one person, one host and fifteen Paperclip agents. Schema v11 renames the users table to actors and spans.user_id / daily_usage.user_id to actor_id; the API moves to /api/v1/actors, ?actor_id= and actors_count; the dashboard's Users page becomes Actors at /actors; export archives become format_version 2. The rename runs in Go before schema.sql, because a rename cannot be idempotent in SQL and CREATE TABLE IF NOT EXISTS actors would otherwise create an empty twin beside the populated table; it checks the catalog per step, drops and lets schema.sql recreate the spans indexes (DuckDB will not ALTER an indexed table), commits as one transaction, and refuses to start if both tables exist. Requests using the old names keep working - /api/v1/users, ?user_id=, mode=user_only|user_and_history, the /users dashboard URLs, and v1 export archives - but response bodies use the new field names only, and an older binary cannot open a migrated file without losing its tokens: rolling back across v11 means restoring a pre-v11 snapshot
  • docker compose build tags its result cotel-local:latest instead of ghcr.io/flopsstuff/cotel:latest. Compose treats image: next to build: as the name to tag the local build with, so the published name was being reused for an artifact that never came from the registry: on the production host — where the deploy is docker compose build --pull followed by up -d, and --pull refreshes the Dockerfile's base images rather than the app image — Image=ghcr.io/flopsstuff/cotel:latest named a locally built binary, and built-here and pulled-from-registry were the same string. Three things follow from splitting them. You can read which artifact a host is running off the name. The thing the release pipeline publishes, and which release.yml moves only on an explicit dispatch, is no longer shadowed by every merge to main. And docker pull ghcr.io/flopsstuff/cotel:latest on the production host stops being able to swap the running service's binary at its next restart for content no deploy step validated — it now lands on a name nothing there runs. Production still builds its image, deliberately: a pull-only production would mean a merge to main no longer changes production, which is a separate decision from this cleanup and would need its own ADR. The operations pages name both images where the distinction matters — the recovery procedure's "match the CLI to the version linked into cotel" step asks cotel-local:latest on a host that builds its own image — and they also record that ghcr.io/flopsstuff/cotel:latest is now a multi-arch index whose linux/arm64 entry runs natively on a Pi or Apple Silicon, so the documented docker run --entrypoint /usr/local/bin/cotel … --db-query and --db-import commands are honest on arm64 without a local build (docs/operations/duckdb-recovery.md, docs/operations/duckdb-snapshots.md)

Fixed

  • A paperclip.agent.id sent in upper or mixed case now finds its actor. The dashboard stores the id lowercased and the ingest lookup compared it as sent, so such spans stayed on Anonymous.
  • Codex and Grok CLI agents get sessions, models, tokens and cost. Paperclip's Codex (codex-app-server) and Grok (grok-cli) agents were exporting spans that ingest stored with no session, so they never reached the Sessions page, and with no tokens or model, so they cost $0. Neither harness uses Claude Code's attribute names, and both emit several spans per event. internal/ingest/producers.go adds an adapter per harness, chosen by service.name and applied only to those spans. Claude Code spans are untouched. For Codex, the session comes from conversation.id, or from thread.id when it is a UUID (on other spans it is the OS thread number). Usage comes from the turn span's codex.turn.token_usage.*, with cached input split out. The per-request gen_ai.usage.* copies are not read, since they sum to the turn. A tool call is a span with both tool_name and call_id. For Grok, the session comes from session_id and the model from model_id. Tokens are kept only on session.process_conversation_turn, with cache_read_tokens taken out of its inclusive input_tokens, because sampling.stream_decode repeats the output count. Only tool.execution counts as a tool call, not tool.decision. Prices are added for gpt-5.6-sol ($4 input / $0.40 cached / $20 output) and grok-4.7 / grok-4.6 ($2 / $0.50 / $6), at base rates, taken from third-party rate cards that cite the providers. Grok still lands on Anonymous: it does not carry paperclip.agent.id (ADR-0029). Cursor exports no telemetry at all. Already-stored spans are not rewritten, because session_id is an indexed column (see the ART incident).
  • Actor and overview session counts no longer count a span stored without a session id as a session. An actor whose only spans were sessionless showed one session on Actors and none on Sessions.
  • Spans from the Claude 5.5 / 5.2 generation are priced. From 2026-11-07 every span from claude-opus-5-5, claude-fable-5-2 and claude-haiku-5-5 was stored with cost_usd unset because the price table did not know them, so the dashboard showed $0 for a week of real traffic. Adds Opus 5.5 ($4/$20), Sonnet 5.5 ($2/$10), Haiku 5.5 ($0.10/$0.50; its $0.50/$2.50 rate for prompts over 100K tokens is not modelled, since a span does not say which tier billed it), Fable and Mythos 5.2 ($8/$40) and 5.1 ($10/$50), with the published cache-read rates where they depart from 0.1 x input. Sonnet 5 moves from $3/$15 to the $2/$10 Anthropic still publishes. pricing.Known tells an unpriced model from a priced span that costs zero. Already-stored spans keep their unset cost until --backfill-cost-apply runs
  • The Deploy workflow stops asking the production host's GUI keychain for credentials it does not hold, and stops being able to hold the deploy queue indefinitely when something does hang. docker compose build --pull makes buildkit resolve the Dockerfile frontend and the base images, which makes the docker CLI consult the credential store named in the host's ~/.docker/config.json. On the production runner that store is desktop, whose helper is tied to the logged-in GUI session: spawned from the runner's launchd session it blocks in open(2) and never returns, buildkit re-spawns it on every retry, and a single hung call also stalls image resolution for any other build on that host (measured: a hand build from an interactive shell, normally 2.6 s, sat 4 min behind one). Nothing in the run log said so, because the hang lands before the first layer and the step's last line is the frontend resolve. The same helper call from an interactive shell on the same host answers in milliseconds, so both the hosted-runner smoke build and a hand build on the deploy host passed throughout. The job now builds against a copy of the config carrying the host's contexts and CLI plugins but no credential store at all, which is faithful to what the host actually has: its auths map is empty, and registry auth, if it is ever needed there, belongs in an explicit docker login with a repository secret rather than in one person's keychain. The deploy job also gains timeout-minutes: 20. The first wedge ran for nine hours and, because deploy-main has cancel-in-progress: false, every push behind it sat pending with no job at all, which is indistinguishable from an idle queue: production kept serving a build five days old, the next runtime fix would silently not have shipped, and no run ever went red to say so. A hung build now fails loudly and releases the group instead.

[0.4.0] - 2026-10-13

Added

  • The scheduled health probe watches the database snapshots, not just the process. scripts/probe-healthz.sh follows a green /healthz with a second question to /api/v1/health — the only place the snapshot worker's report exists — and goes red (exit 6) on status: "error", on a last_run_at older than SNAPSHOT_STALE_AFTER_SECONDS (default 43200 s, two COTEL_SNAPSHOT_INTERVAL periods at the shipped 6h), and on a status: "ok" whose timestamp is missing or unparseable. The worker could previously die or start failing and nothing would say so until a human opened the endpoint, which is the shape of the failure that already cost six days of blind outage. The claim is deliberately kept off /healthz: that endpoint is the container liveness contract read by cotel --healthcheck, the Docker HEALTHCHECK and scripts/wait-for-healthy.sh, and a failed backup must not mark a working container unhealthy or fail the next deploy — the boundary is checked at the edge and the backup claim lives on the alert path instead. status: "unknown" stays silent by default, because it means both "the worker has not run yet" and "snapshots are disabled", and disabled is the shipped default everywhere but production: a probe reddening on it would lie on every local instance. SNAPSHOT_CHECK=require is the caller asserting snapshots are expected here and turns that — along with a missing snapshot field and an unreadable /api/v1/health — red too; SNAPSHOT_CHECK=off skips the question. The /api/v1/health address is derived from the /healthz URL the probe is already given, so the host wrapper on the Pi needs no edit and the check reaches the timer with the merge. Exit 6 rather than 5, which ~/ops/cotel-healthz.sh already spends on "the LAN half is green and the public ingest half is not" (docs/operations/duckdb-snapshots.md, docs/operations/health-probe.md)
  • cotel snapshots its own database. A worker runs EXPORT DATABASE ... (FORMAT PARQUET, COMPRESSION ZSTD) at startup and then every COTEL_SNAPSHOT_INTERVAL, into one dated directory per snapshot under COTEL_SNAPSHOT_DIR (/snapshots in compose, its own volume), keeping the COTEL_SNAPSHOT_KEEP newest. It had to be taken from inside cotel: DuckDB has one writer and the live process holds the file lock, so no external process can open the database even read-only. Measured on the production host against a probe copy of the live 152.6 MB database, the export holds the single connection for 0.15-0.3 s and writes 4.2 MiB - 1/35th of the file for a full copy of all six tables - and because it runs on that same connection it cannot race the WAL checkpoint: the two are serialised by construction rather than by a lock. The format is the point: Parquet plus a plain-text schema.sql is readable by any DuckDB build, and an import rebuilds the secondary indexes from the data, so a snapshot of a database with a damaged ART index - the September 2026 failure, a file whose rows were all readable - restores to a healthy one, where a byte copy of the volume reproduces the damage faithfully. snapshot.json is written last and by nothing else, so its presence is the only "complete" signal; it carries the row count per table, read back out of the Parquet files, so a restore is checked against what the snapshot claims rather than trusted. A snapshot is only taken when the newest complete one is older than the interval, so a restart - or a crash loop - cannot spend the retained window on snapshots minutes apart. Pruning keeps the newest N complete snapshots, deletes incomplete ones, runs only after a successful export, and leaves directories whose name is not a snapshot instant alone (ADR-0023, docs/operations/duckdb-snapshots.md)
  • cotel --db-import <dir> restores a snapshot into COTEL_DB_PATH and verifies every table against the snapshot's manifest, failing with the table and both numbers named if a count does not match. It needs nothing but the image already on the host - no DuckDB CLI with its version matched by hand, which is the step of the recovery procedure most able to destroy a file. It refuses a target that already holds tables (the snapshot's schema.sql issues plain CREATE TABLE, so importing over data would fail halfway and leave a mixed database) and a snapshot with no snapshot.json. Note that the paths in a snapshot's load.sql are absolute, so a snapshot cannot be moved or renamed and still be imported; it must be visible at the path it was written to
  • GET /api/v1/health reports a snapshot object (status, last_run_at, last_error, last_dir), and a failed export flips the top-level status to degraded - the same treatment a failing retention roll-up gets, because a backup that has been failing quietly for a month is worse than a known absent one. unknown covers both a worker that has not run yet and snapshots left disabled, which is the default outside the compose file
  • The Overview leads with a Span activity grid — a block of cells counting spans, GitHub-contribution-graph style, sitting directly under the KPI row. A line chart answers how much and when; it does not answer what does a week here look like, which is the question a telemetry front door gets asked most. The selected range picks both the grid and how much time one cell is: 53 × 7 day cells over a year (and over All), 31 × 6 four-hour cells over a month, 24 × 7 hourly cells over a week, 24 × 6 ten-minute cells over a day — each tiling its window exactly, and each about 115 px tall, so switching range does not move the page under the reader. Cells outside the queried window — the leading edge of the lattice, and the rest of today — are drawn as an outline with no fill: an empty cell means "we looked and there was nothing", an outline means "we did not look", and conflating the two is how a heatmap invents a quiet weekend. The grid is placed in UTC, which the footer and every tooltip say. Intensity is cut at the quartiles of the cells in view, not scaled against the busiest one: against a 722-span peak a 200-span day and a 700-span day are both "busy", so a max-relative ramp — linear or log — renders a working week as one flat block of full-intensity cells, which is the difference the grid exists to show. A step therefore means a rank, so the footer names the busiest cell in view and every tooltip gives the cell's own count. The scale lives in frontend/src/lib/heat.ts and is shared with the History page's calendar and hour-of-day heatmaps, which had a private copy of it and pick up the quartile cut with this change (ADR-0016)
  • GET /api/v1/history accepts two more bucket widths, granularity=10m and granularity=4h, so the activity grid asks for exactly the width it draws — one bucket, one cell — instead of re-bucketing an hourly series in the page, which could not have produced a ten-minute cell at all. Both are additive and no existing caller changes; an unrecognised width still falls back to day rather than 400ing. Like hour they are answered from spans alone and report the shortfall in covered_since, because daily_usage buckets whole UTC days and cannot produce a sub-day bucket. bucket is now documented as a UTC wall-clock label floored to the width, on any host, so a client can reconstruct it for an instant without asking what the server thinks midnight is
  • scripts/seed-demo.py fills a throwaway instance with a synthetic team — seven users, three models, 90 days of sessions and tool calls. It goes in over the OTLP endpoint rather than writing to DuckDB, so a seeded instance exercises the same ingest, cost-derivation and roll-up path a real one does, and it sends only attributes Claude Code actually sends: no command on Bash spans, so the Tools page shows the same "no command detail" state a real install sees. The RNG seed is fixed, so a re-run against a fresh volume reproduces the same numbers. scripts/shoot-screenshots.mjs turns that instance into the README images, each cropped at the bottom edge of a named element rather than at a pixel count (docs/operations/screenshots.md)
  • GET /api/v1/overview, /sessions, /costs and /models accept range, the same five-key rolling window /users and /tools already took, and each echoes back the key it used. Defaults preserve today's behaviour instead of converging on one value: /overview and /costs default to month (the 30-day window they already applied), /sessions and /models to all, because they had no time filter and a month default would silently truncate every existing caller. Long ranges resolve against the spans ∪ daily_usage union at the raw-floor split, so year and all keep answering after retention has deleted the raw spans rather than repeating the month figure. On /costs, explicit from/to still beat the range key and the response then echoes "range": null (ADR-0014)
  • GET /api/v1/sessions returns covered_since. A session row needs a start time, model and status, none of which the roll-up keeps, so the list is raw-only; a range reaching past the raw floor is clamped and the field names the instant the list actually starts from (null when the range is fully covered). The Overview's Sessions block states that window in one line. The session count KPI is unaffected — daily_usage carries session_id, so counting distinct sessions across the union is exact
  • GET /api/v1/history accepts range too — the last read endpoint that did not. It defaults to month, the window from/to already defaulted to, so a caller that passes no range sees exactly what it saw before; explicit from/to still win and the response then echoes "range": null, the precedence /costs sets. At day, week and month granularity buckets and by_model resolve over the spans ∪ daily_usage union at the raw-floor split, so the History chart no longer stops a month back while the Costs panel beside it charts a year. hour stays raw-only and reports it in covered_since: the roll-up consumes whole UTC days and cannot produce a sub-day bucket, and day-shaped data under an hour label would be worse than a stated shortfall. from/to in the response echo the resolved bounds and are null on a side the window does not bound (ADR-0014)
  • GET /api/v1/history returns heatmap_covered_since. Both heatmaps resolve hour of day, which daily_usage does not keep, so they stay raw-only however far back the charts above them now reach. The History page states that window under each one instead of drawing empty cells that read as "no activity" for days that were merely rolled up
  • /healthz and GET /api/v1/health report last_ingest_at and newest_span_age_seconds. A cotel that is up but receiving nothing used to be indistinguishable from a healthy idle one — the dashboard answered {"ok":true,"spans":0} for six days of total ingest loss — and the age was not derivable from any other field, so no external poller could have caught it. The age is measured from the span's ingested_at, not its start_time: replaying an archive carries the original ingest time, so a restore cannot make a dark instance look alive, and a span arriving late with an old start_time still counts as fresh traffic. An empty database reports null for both rather than 0, because "nothing ever arrived" is not "something arrived just now". Staleness deliberately does not change the status code on either endpoint — /healthz drives the container HEALTHCHECK, and the threshold at which silence becomes an alert belongs to whoever polls, not to the container. Both additions are additive; ok, spans and span_count are unchanged

Fixed

  • The Cloudflare tunnel token is no longer printed into the container log. cloudflared logs at INFO the value of every environment variable whose whole KEY=VALUE string merely contains TUNNEL_ - matched against the pair, so a hit can come from the name or from the value - and redacts only the two variable names it declares itself, TUNNEL_TOKEN and TUNNEL_CRED_CONTENTS. Our own CLOUDFLARE_TUNNEL_TOKEN therefore matched the filter, missed the redaction list, and landed in docker logs in full on every start. That it leaked at all was luck rather than design: the dump splits KEY=VALUE on every = and drops the pair unless exactly two fields come back, so a token whose base64 carries = padding is silently skipped while one whose length happens to be a multiple of four is printed. The entrypoint now copies the token into a shell variable, unsets the exported one, and passes the value as --token, which cloudflared does redact (Settings: map[token:*****]). The reach was wider than the host: scripts/wait-for-healthy.sh copies container logs into the CI run log on a failed deploy, and the only thing standing between the token and a public job log was GitHub's literal-match secret filter. Upgrading cloudflared would not have fixed this - the dump is unchanged between 2024.11.1 and 2026.9.3, both verified by running the binaries against a synthetic padding-free token - so the pinned version stays where it is. docs/operations/cloudflare-tunnel-remote.md now tabulates what token mode does and does not hide: the log is clean, while docker inspect, /proc/1/environ (an environment block is a snapshot taken at exec, so a later unset cannot clear it) and ps inside the container all still carry the value - each of which already requires host or container access
  • A schema apply that corrupts an ART index now fails the start instead of serving traffic. After storage.Open, cotel runs the same CHECKPOINT used on shutdown; a hard failure exits 3 and writes <db>.checkpoint-failed before the gates open, so the deploy health gate catches it. A timeout stays benign and the process continues. Measured on a 35 000-span file: the extra start checkpoint is <1 ms when schema is skipped, 8 ms immediately after a schema re-apply that rebuilds the four indexes
  • /healthz stops claiming ok when its query failed. The span count was read with a discarded error, so an unreadable database answered {"ok":true,"spans":0} — the same body as a brand-new empty one, which made ok very nearly a constant and no signal at all. A failed query now answers 503 with {"ok":false}, matching the pre-storage readiness gate on the same endpoint, so the container probe cannot report a dead database as healthy. Staleness is still not a failure and still answers 200
  • An unknown model no longer prints a warning on every ingested span. pricing.Compute sits on the ingest hot path, so one missing table entry used to drown the rest of the log — and the warning claimed cost_usd would be 0, which is not what ingest writes: it leaves the column NULL. Each canonical model id is now logged once per process, the message says the column is left unset, and the seen-set is capped at 256 so a client spraying distinct model strings cannot grow it without bound
  • A dated model id resolves to a price. Claude Code sends Haiku 4.5 as claude-haiku-4-5-20251001, but the price table is keyed undated and the lookup only stripped the tier suffix ([1m]), so every Haiku span was stored with cost_usd left NULL behind a pricing: unknown model warning — ingest keeps the column unset rather than writing a zero, so the spans were absent from spend totals rather than counted as free. The trailing -YYYYMMDD is now stripped after the tier suffix — a real id can carry both — and only when the tail is exactly eight digits, so a version segment (claude-haiku-4-5) is not mistaken for a date. The table is unchanged: undated keys stay the one canonical form
  • GET /api/v1/overview's users_count obeyed neither the time window nor the user_id filter — it was a bare SELECT COUNT(DISTINCT user_id) FROM spans, so the "Users" KPI answered all-time and unscoped next to four KPIs that did not. It now counts the distinct principals active in the selected range, and counts unattributed spans as the single __anonymous__ principal the users list shows rather than as zero
  • The Overview's total_cost_usd and token KPIs no longer drop spans that carry no session_id. They were computed under the same session_id IS NOT NULL clause as the session count, so the page's cost total could sit below the Costs page's for the same window
  • A bare WHERE col = <constant> on spans returns the matching rows again instead of silently returning none. duration_ms was a VIRTUAL generated column declared mid-table: it took a logical slot but no storage slot, so every column after it had a logical index one ahead of its physical index, and an equality on such a column probed an unrelated ART index and found nothing — a wrong result, not an error. Schema version 10 drops the column and computes the duration at the four queries that read it, so logical and physical indexes line up and the trap is gone rather than worked around; the engine-fragile COALESCE(tool_name, '') = 'Bash' workaround (DuckDB 1.4+ pushes COALESCE down too) goes with it. Verified against a copy of production (108 MB, 34 706 spans): tool_name = 'Bash' counted 0 rows before the migration and 6 440 after, service_name = 'claude-code' 0 before and 34 705 after, with the span count unchanged (ADR-0013)
  • A failing GET /api/v1/bash-commands no longer renders as the "no command detail in this data" explainer. The Bash section branched on row count alone, so a request that errored looked identical to one that legitimately returned nothing, blaming Claude Code's telemetry for what was actually a server fault. Fetch failures now show the error

Changed

  • Release images are multi-arch (linux/amd64 + linux/arm64). release.yml builds each platform on a native hosted runner and merges a manifest list, so docker pull ghcr.io/flopsstuff/cotel:latest works on arm64 hosts (Pi, Apple Silicon) without a local docker compose build before restore. QEMU-emulated arm64 on a single amd64 runner was measured and rejected; native ubuntu-24.04-arm finished the same Dockerfile in ~47s (ADR-0003, docs/operations/duckdb-snapshots.md)
  • The bundled cloudflared is 2026.9.3 in place of 2024.11.1, still an explicit pin rather than latest so rebuilding an old commit produces the binary it originally shipped. The two years in between hold one change that touches cotel: 2026.4.0 flipped the --edge-ip-version default from 4 to auto, which connects over whichever address family the system resolver answers with first and falls back to the other only after a connection has already failed - so a container whose resolver answers AAAA first but has no working IPv6 egress spends its first attempts failing, and then sticks with the fallback for ten minutes at a time. Token mode therefore sets TUNNEL_EDGE_IP_VERSION=4 unless the operator sets it, holding the behaviour the old version had; local-config mode is deliberately left alone, because that env var silently outranks an edge-ip-version in the operator's own config.yml. The other new arrival is visible rather than behavioural: cloudflared now probes DNS, QUIC, HTTP/2 and the Cloudflare API at startup and logs a CONNECTIVITY PRE-CHECKS table, which is kept on - it runs concurrently with startup and does not gate it, a FAIL row does not stop the tunnel, and it is the fastest way to separate a blocked UDP path from a bad token, which is exactly the diagnosis the deploy health gate cannot make because it probes cotel's /healthz and not the tunnel. The bump does not address the token-in-logs leak and was kept out of that fix for the same reason the fix was kept out of this bump: measured on 2026.9.3, a token left in the environment is still printed in full by the startup env dump. --token-file, which the new version adds, is not adopted either - the token stays readable through docker inspect and /proc/1/environ regardless, so it would close no access path in exchange for a tmpfs mount and a secret on disk (docs/operations/cloudflare-tunnel-remote.md)
  • The DuckDB driver is github.com/duckdb/duckdb-go/v2, which carries engine 1.5.6 in place of 1.1.3. The reason is not the version: github.com/marcboeker/go-duckdb is deprecated by its own author — the first line of its go.mod reads "This module has moved to github.com/duckdb/duckdb-go" and its last tag is a year old — so cotel was pinned to an address that is no longer the dependency and has no upstream to receive a bug report. This is not a fix for the ART-metadata corruption that took production down: upstream duckdb#25360 reports the same class of fault still reproducing on 1.5.5, and what the newer engine changes is that it raises a Go error instead of abort()ing inside cgo. The on-disk format was the thing that needed measuring, since a newer engine writing a file the previous image cannot read would make the upgrade unrollbackable with production's only copy of the data inside it — and it does not: an existing file is never converted by ordinary open-and-write, not even when storage_compatibility_version=v1.5.6 is asked for explicitly, and 1.1.3 reads a file 1.5.6 has written to, replays a WAL 1.5.6 left, and was confirmed doing so as the actual ghcr.io/flopsstuff/cotel:latest image. The door closes only for a newly created file at an explicit opt-in, so storage.Open now pins storage_compatibility_version=v0.10.2 in the DSN and a test reads the format number straight out of the file header to hold it at 64 — the pin is a no-op against today's engine, which is the point: a default is behaviour, not a contract, and a future minor could raise it and leave no diff of ours to point at. Two further consequences: Go 1.24.0 is now the build floor (go.mod, the builder image and CI move together), and the runtime image grows 213 MB → 294 MB for the bigger static engine library — against which ICU is now linked in rather than fetched over the network on every cold start. A DuckDB JSON column no longer scans into a Go *string (v2 hands back a decoded map[string]interface{}), so ExportSpans and the session-detail query cast in SQL; any new query reading attributes or resource_attrs into a string needs the same ::VARCHAR (ADR-0018)
  • The chart palette is re-derived — eight of its ten values change, --color-chart-1 is unchanged in both schemes because it is --color-accent. The old palette broke two things at once. Its dark values were the light values lightened, which reverses loudness when the surface flips: the quietest series in light was the loudest in dark, so the Overview's cost line shouted over the spans area it annotates for any reader on a dark theme, and did not for anyone on a light one. And it was not the colour-independent palette it was documented to be — chart-1 and chart-2 measured ΔE 0.4 light / 0.3 dark under deuteranopia, the same colour to roughly one man in twelve, and the palette is handed out in order, so that was the pair every two-series chart in the product drew. The new values hold both rules with margin: identical salience rank in both schemes, and every one of the ten pairs ≥ 8.6 ΔE under protanopia, deuteranopia and tritanopia in both schemes, measured with Machado 2009 at severity 1.0 in OKLab. Each token keeps its hue to within 3° — the palette still reads blue, violet, green, amber, pink — and only lightness and chroma moved; the contrast floor against the surface rises from 3.19:1 to 4.08:1, above the 3:1 WCAG 1.4.11 asks of a 2 px stroke. --color-chart-4 also stops being byte-identical to --color-warning, which it was in both schemes: the cost line was literally the warning colour. The rules, the ruler and the full pairwise measurement are in tokens.md
  • The Overview's Activity & Cost block is Spans & cost, and its right-hand legend entry is Cost (right axis). The old title collided with the Span activity grid two blocks above it — two headings saying activity, both charting spans, so a reader looking for span volume over time had no scent to follow and landed on the heat grid first; the new one names the two series instead, in the order the chart ranks them, and matches the sentence case of every other block title. The legend dropped , USD because the right axis is already tick-formatted in dollars. The axis callouts themselves stay: they are what keeps the two series identifiable without colour, which matters more than a tidy label. Below roughly 400 px the legend no longer floats over the plot — it is a row of the block that wraps above the chart, where Cost (right axis, USD) used to land on top of the right axis's $12.00 and leave both unreadable — and the legend swatches now wear the same two marks as the series, a filled area and a bare line. Desktop is unchanged to the pixel: same position, same block height. Section headers generally wrap their links onto a second line rather than squeezing the title, which was breaking Spans & cost across two lines on a phone
  • The README screenshots are of the software as it now is. The single hero shot predated the Overview rework — it showed the deleted user-search cloud, Sessions at the top, KPI labels hardcoded to (30d) and no range switcher. It is replaced by the current Overview plus a Screens gallery of Sessions, Costs, Users and Tools, all taken from the demo seed, so no real user name or real spend is published. The README's logo <img> pointed at assets/logo.svg, a path that does not exist in the repo and rendered as a broken image on GitHub; it now points at docs/assets/logo.svg. The current-release tag reads :0.3, not :0.2
  • The Overview is one window instead of five. A single range switcher in the header — its own cotel_overview_range cookie, so it does not move the Users or Tools page — scopes every figure on the page. Previously the KPIs showed 30 days, the Sessions and Models blocks showed all time, and only the KPI labels said which, as a literal (30d) baked into the string; a reader comparing the Sessions KPI against the Models table below it was comparing 30 days against all time. Labels now take their suffix from the selected range, and All renders none
  • The Overview's History and Costs blocks are one block, Activity & Cost, charting spans and spend on one field: spans as a filled area against a left axis in --color-chart-1, cost as a line against a right axis in --color-chart-4, with the legend naming the axis each series reads against and the block header linking to both full pages. It is fed by one /history call rather than two requests — buckets already carried cost_usd beside spans, from the same row of the same spans ∪ daily_usage union, so the two series are bucketed, windowed and user-filtered identically by construction instead of by a client-side join that has to keep three things in sync. Both series now also start and stop together on every range, including Day, where cost is charted hourly for the first time — /costs is daily-only, so the old pair showed 24 hourly points above a single daily one. Two y-scales on one plot is a shape that can invent a correlation the data does not hold; the two series wear different marks and the legend states the sides in words to keep the plot readable, and ADR-0015 records what that mitigation does and does not buy. The colour pair was validated, not eyeballed: CVD separation ΔE 32.3 protan / 29.3 tritan in light, 29.9 / 24.6 in dark, against a target of ≥ 8
  • Overview section order is Users, Activity & Cost, Tools, Models, Sessions. A new Users block leads with the top 5 principals by spend in the selected range, and Sessions moves to the bottom as the one block that cannot honour a long range. The Overview charts cost without a by-model table beside it — the Models block below is the same data at full width
  • The Overview's activity chart stops borrowing the sessions list's covered_since and reads the coverage the history response reports for its own series. The note it printed on Year and All is gone on every range the union now covers, and remains only where the chart is genuinely short — the Day range, which charts hourly. RANGE_DAYS goes with it: the page no longer derives from/to from the range key at all, so its copy of the window lengths cannot drift from the server's
  • The Overview's user-search typeahead is gone, and the UserSearch component with it. Scoping is reached from a user's page ("View activity"); ?user_id= now shows a chip in the header naming the user and clearing the scope on click, instead of a page that was silently filtered with nothing on it to say so
  • A deploy now fails when the container does not come up. The Deploy workflow ended at docker compose up -d, which returns once the container has started, not once it works — so the last thing it observed of a deploy was Up Less than a second (health: starting) and it went green on that, reporting a container whose storage.Open had died identically to one serving traffic. It now runs scripts/wait-for-healthy.sh, which blocks on the container's own HEALTHCHECK and fails the job on unhealthy, on an exit, on a crash loop (in under a second, rather than waiting out the timeout — only restarts seen during the wait indict a deploy, since up -d leaves an already-current container in place and one that crashed once and recovered carries a restart count for the rest of its life, including while it legitimately replays a WAL), on a service that defines no healthcheck at all, or on a 120 s timeout — dumping docker compose ps, the last health-probe output, the crash cause and the container logs so the reason is in the run log instead of on the runner. The crash cause is searched for rather than tailed, because a tail cannot carry it: a Go crash names its fault on the first line and then prints a goroutine dump thousands of lines long, so --tail=200 reliably begins mid-stack, past the only line that says why the process died — which is how a run of red deploys showed no reason at all. The gate scans the whole log for that header (fatal error:, panic:, [signal …]), prints the first one in context ahead of the tail, and reports how many it found, since more than one means the container died repeatedly. The excerpt reaches backwards as well as forwards: a crash inside cgo is reported twice, the C++ runtime stating why it aborted before Go prints SIGABRT, and that earlier line is the real cause — for the DuckDB open that took the deploy down it was terminate called after throwing an instance of 'duckdb::InternalException', two lines above the Go header. LOG_TAIL, CRASH_CONTEXT and CRASH_CONTEXT_BEFORE tune it. workflow_dispatch takes a health_timeout input for the one deploy that legitimately needs longer: a start following a hard kill replays the WAL. The CI smoke job runs the same script in place of its curl-until-ready loop, so a break in the gate surfaces on a PR rather than on a deploy. Measured against a 109 MB copy of production, healthy at 6 s from cold with a 3.9 MB WAL to replay (the open itself 2.8 s, including the v10 migration) and 6 s on a redeploy of the warm database — the 6 s is the probe cadence, not the database
  • The image HEALTHCHECK gains --start-interval=5s. --interval=30s also governed the probes during start-period, so a container that was ready in two seconds still reported starting for thirty, and the deploy gate above would have waited out all of it
  • Schema version 10 removes spans.duration_ms. The migration moves no row data: it drops the four secondary indexes, drops the column (DuckDB refuses to ALTER a table an index depends on), and the existing CREATE INDEX IF NOT EXISTS block rebuilds them. On the 108 MB production copy the whole upgrade added 0.4 s to a cold start already dominated by WAL replay (9.5 s → 9.8 s), and a later re-apply of schema.sql costs 138 ms. No downgrade path: an older binary still starts against a v10 database (CREATE TABLE IF NOT EXISTS cannot bring the column back) but every query naming duration_ms then errors, so a rollback needs the pre-upgrade database too. Exported CSVs are unaffected — the duration_ms column of spans.csv was already derived in Go, so the format version does not move
  • Tools page is flat: the tools table sits directly on the page instead of inside an "All Tools" card. DataTable already draws its own bordered surface, so the card put a box inside a box for a heading the page title already gave. Matches the Users page
  • The Bash commands section no longer vanishes when it has no rows — it always renders and says why it is empty. Claude Code's tool spans carry tool_name, tool_use_id and duration_ms only: which tool ran, not what it ran. No command attribute is ever sent (verified against a captured live session, including the enhanced-telemetry beta), so this breakdown stays empty against Claude Code telemetry no matter what — the DuckDB filter-pushdown fix in 0.3.0 was a real bug fix but could not, on its own, put rows in this table. The endpoint is kept for OTLP producers that do send command

[0.3.0] - 2026-08-09

Fixed

  • Pricing table now covers the Claude 5 family (Fable 5, Mythos 5, Opus 5, Sonnet 5) and the missing 4.x models (Opus 4.8, Opus 4.6). Spans from claude-opus-5 were previously recorded with cost_usd = 0 because the model was absent from the table
  • Corrected two stale rates: Opus 4.7 ($15.00/$75.00 → $5.00/$25.00) and Haiku 4.5 ($0.80/$4.00 → $1.00/$5.00) per MTok
  • Retention roll-up no longer aborts with NOT NULL constraint failed: daily_usage.model when a span has an empty or NULL model, session_id, or tool_name. Such spans are now rolled up under an unknown sentinel instead of silently stopping all aggregation and purging (ADR-0009)
  • No more silent telemetry loss on restart/deploy: the ingest (:4318) and dashboard (:8080) ports now bind and accept connections before the DuckDB open (WAL replay + schema migration), which can take minutes on a large production database. During that window both ports answer a retryable 503 with Retry-After instead of resetting the connection, so OTLP exporters retry and spans are delivered once cotel is ready. Previously the ports bound only after the open finished, so every deploy had a multi-minute window where ingest refused connections and dropped spans
  • Retention roll-up no longer loses part of a day's usage. The cutoff was a wall-clock instant, so with the worker ticking every 6h (COTEL_RETENTION_INTERVAL) a day was rolled up in slices; because daily_usage is keyed by day and written with INSERT OR REPLACE, each slice overwrote the previous one while its raw spans were already purged. Every day's span_count, token totals and total_cost_usd were therefore systematically understated — only the last slice survived. The cutoff is now snapped back to UTC midnight — the same boundary the day key is bucketed on — so only whole days are ever rolled up and purged. Trade-off: raw spans now live up to one day longer than COTEL_RETENTION_RAW_DAYS (default 30). Aggregates already flattened by the old behaviour cannot be recovered — the raw spans are gone
  • Retention is now correct on servers that do not run in UTC. A span's day is its UTC calendar day, but both retention cutoffs were computed in the server's local zone, so on any host at a non-zero UTC offset — including UTC+1/+2 — the boundary fell inside a day bucket and re-introduced the overwrite above for spans near midnight UTC. Both cutoffs are now computed in UTC, and the retention tests run under a matrix of server timezones so the alignment cannot silently regress
  • Retention roll-up no longer overwrites an already-rolled-up day's aggregate when a span dated to that day arrives late — a backfill, or an import of telemetry older than COTEL_RETENTION_RAW_DAYS. The day had already been aggregated and its raw spans purged, so the next cycle recomputed the day from the single late span alone and INSERT OR REPLACEd the correct total away, silently corrupting historical cost. Late spans now accumulate into the existing daily_usage row (ON CONFLICT DO UPDATE) instead of replacing it; the accumulate and the raw-span purge run in one transaction so a crash between them cannot double-count
  • Fast restarts: cotel now runs a DuckDB CHECKPOINT on SIGTERM/SIGINT before exiting, folding the write-ahead log into the main file, and the container entrypoint forwards the stop signal to cotel and waits for it. That multi-minute cold start on a large DB is WAL replay, not the schema migration — previously every deploy killed cotel with a non-empty WAL (the old entrypoint never forwarded the signal and cotel had no handler), so the next start replayed the whole log. Measured on a copy of production (108 MB DB, 6.2 MB WAL): a cold start took 5m38s; after a graceful stop the next start is 0.14s. A hard kill (docker kill, OOM, SIGKILL after the stop grace period) skips the checkpoint and pays the replay again, but never corrupts the database and loses no committed span — DuckDB replays the WAL on the next open
  • GET /api/v1/bash-commands returned an empty list on every request from the day it shipped, so the Tools page's per-command Bash breakdown always looked like "no Bash calls yet". Under the bundled DuckDB engine a bare tool_name = 'Bash' predicate is pushed into the table scan and then matches nothing; the query now uses a form the optimizer leaves alone. Only tool_name and service_name are affected — filters on session, model, user and the id columns were always correct

Added

  • COTEL_WAL_AUTOCHECKPOINT (default 4MB, DuckDB's own default is 16MB) caps how large the write-ahead log grows before DuckDB folds it into the main file. A graceful stop avoids WAL replay entirely; this cap only bounds the replay an ungraceful kill (OOM, SIGKILL after the grace period) leaves behind, by folding the log — including a retention roll-up's ~6MB of deletes — into the main file promptly. The cost is slightly more frequent checkpoints during ingest, negligible at cotel's write rate
  • Startup logging of each phase — opening db, db ready: schema/migrations applied in <duration>, and ready: serving live traffic … — so a slow open is visible instead of a silent container. Plus a Docker HEALTHCHECK (cotel -healthcheck, which probes the dashboard /healthz) so the container reports health: starting until the database is open rather than a misleading Up; no curl/wget is added to the runtime image
  • daily_usage now preserves cache-token totals through roll-up: new total_cache_read_tokens and total_cache_write_tokens columns (schema v8) are filled by RollupAndPurge and carried through /api/v1/export and import. Previously only input/output tokens survived the roll-up, so aggregates older than the raw-span retention window (default 30 days) undercounted total tokens by ~2 orders of magnitude — in real traffic cache tokens are ~99% of volume. Additive, idempotent migration (ADD COLUMN IF NOT EXISTS); rows rolled up before the migration keep NULL (honestly unknown, not 0). Export format_version stays 1 — additive columns don't bump it (ADR-0005). Cost was already correct (SUM(spans.cost_usd))
  • Retention worker health on GET /api/v1/health: a retention object (status / last_run_at / last_error); a failed roll-up flips top-level health to degraded and logs at ERROR level instead of failing silently
  • Schema migrations are version-guarded on startup: storage.Open skips the whole of schema.sql when the database already records the current schema version, so migrations run once (on the deploy that introduces them) rather than on every boot. Measured against a copy of production the apply is ~165 ms, so this is correctness hygiene — the multi-minute open is DuckDB WAL replay, which the guard cannot affect (ADR-0010)
  • Users page is now one sortable, searchable, paged list carrying per-user cost and session count, scoped by a range switcher (All / Year / Month / Week / Day, default month) that persists in a cookie. Sorting and paging happen in SQL, so "top spender" means top of the whole table for the chosen window rather than top of whatever the browser had loaded. Ranged figures union raw spans with the daily_usage roll-up, so a window older than the raw-span retention still answers; created_at and last_seen stay all-time (ADR-0011)
  • Per-user page at /users/:id (new GET /api/v1/users/{id}), reached by clicking any row. The token, rotate and delete actions that used to crowd every list row live there
  • Tools page gains the same contract: ranged call counts, average duration and error rate per tool, server-side sort, search and paging, with the range switcher in the page toolbar. Tool metrics union raw spans with the roll-up; rows aggregated before schema v9 count toward calls but stay out of the duration and failure denominators, and the response names the instant those two figures actually start from. /api/v1/bash-commands is raw-only by design and reports the window it covers (ADR-0012)
  • GET /api/v1/users and GET /api/v1/tools accept range, q, sort, order, page and limit and echo the resolved values back. Sort keys are whitelisted, total counts matches before paging, and limit=0 returns the unpaginated list the typeahead needs
  • daily_usage preserves average duration and failure counts through roll-up (schema v9): new nullable total_duration_ms and fail_count columns, accumulated the same additive, idempotent way as the v8 cache-token migration, so pre-v9 rows stay honestly unknown rather than counting as zero
  • Sessions and the Overview sessions block show a User column; the Sessions search box filters by user instead of by opaque session ID, and clicking a user filters the table to their sessions

Changed

  • The Users page is flat — title, search, range switcher and Add user on one toolbar row above the table, with no card wrapper around a page that holds a single thing

Removed

  • The "Cost by user (top 10)" chart on Users and the top-10 chart on Tools. Both ranked a fixed slice on one hardcoded metric; the ranged, sortable lists that replace them answer the same question for any column and any window
  • Token display, copy-token and delete from the Users list rows — those actions moved to the per-user page

[0.2.0] - 2026-05-10

Added

  • Multi-user telemetry separation — each Claude Code user's data is tracked independently via user.id resource attribute
  • Bearer-token authentication: API token creation and management via Tokens page; tokens linked to users in OTLP ingest
  • Users page with search, pagination, per-user click-through to filtered analytics, and anonymous user view/delete
  • Unified analytics dashboard with per-user filter across all charts and tables
  • Setup page with step-by-step onboarding guide and copyable agent configuration prompt
  • History page with time-series charts and daily activity heatmaps
  • Session Detail: Cache Read and Cache Write KPI cards
  • Data export (versioned ZIP/CSV) and import endpoint (POST /api/v1/import) with migration support
  • Export/import round-trip integration tests
  • Public ingest URL configuration (COTEL_PUBLIC_INGEST_URL) surfaced on Setup page
  • Cloudflare Tunnel integration: locally-managed mode with bundled cloudflared binary
  • Allow-anonymous setting to accept unauthenticated telemetry
  • cotel logo mark as SVG favicon and sidebar brand
  • GitHub links in header and Setup page
  • VitePress documentation site deployed to GitHub Pages
  • Manual release workflow with automated CHANGELOG stamping, Docker image push to GHCR, and GitHub Release creation
  • Deploy workflow for self-hosted runner on push to main

Fixed

  • Sessions were always empty with Claude Code beta telemetry: corrected attribute key mismatch for tool_name and cache_creation_tokens
  • Cost-by-user chart now sorted by cost descending instead of insertion order
  • Dashboard costs rounded to 2 decimal places
  • Export endpoint returned 401 incorrectly; shared auth middleware extracted and applied consistently
  • Session navigation: use React Router instead of window.location to avoid full page reloads
  • Propagate cotel exit code from entrypoint script
  • GitHub→Paperclip intake: prevent duplicate issues and ensure backlog landing

Changed

  • Legacy server-side rendered dashboard replaced by full React SPA served on all routes
  • Settings page merged into Setup as a second tab

0.1.0 - 2024-11-01

Added

  • OTLP HTTP/JSON ingest endpoint compatible with Claude Code telemetry (/v1/traces)
  • DuckDB-backed storage with session deduplication and span ingestion
  • Dashboard with session, model, tool, and cost breakdowns
  • /healthz endpoint exposing span count for smoke testing
  • Single-container deployment: docker run -p 4318:4318 -p 8080:8080 cotel:latest
  • GitHub Actions CI: build, vet, test, smoke test on every PR and push to main
  • GitHub→Paperclip issue sync workflow