phase 2 single provider

ClickHouse llm_traces MergeTree schema with 90-day TTL and migration runner.

Milestone 2.5.1 — ClickHouse Schema: llm_traces Table

Status: Completed
Goal: 2.5 — Async trace emission to ClickHouse
Phase: 2 — Single Provider End-to-End
ADR: ADR-0033

Acceptance criteria

  • Table created in ClickHouse via migration runner (make clickhouse-migrate)
  • Schema includes all Phase-2 fields (identity, model/provider, tokens, latency, outcome, timestamps)
  • No content fields (prompt text, completion text)
  • TTL configured with default 90 days
  • EXPLAIN on common query patterns shows primary key / org_id usage
  • ADR-0033 written covering schema choices and retention policy

Notes

  • Migration: infra/migrations/clickhouse/000001_create_llm_traces.{up,down}.sql
  • Native migrate DSN (compose host 9002); HTTP 8123 for app clients (2.5.2)
  • Next: 2.5.2 ClickHouse client
Edit on GitHub

Last updated on

On this page

0%