Add OTLP metric ingestion pipeline that persists Sum/Histogram/Gauge data points to fabric.db with canonical instrument names: - MetricAccumulator in workerAnalytics.ts accumulates per-worker running totals for tokens, cost, durations, bead counts - Schema v2 in historicalStore.ts adds metric_samples and session_worker_summaries tables with source preference tracking - flushMetricSamples() in store.ts drains accumulator → SQLite on every event, upserting session summaries and live session rows - docs/schema.md documents instrument names and resolution order Fix source preference ordering (otlp-metric > otlp-span > log-derived) using CASE-based SQL sort instead of alphabetical ASC which was inverted. Fix metricsSource detection to not require costUsd > 0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| FileHeatmap-Integration.md | ||
| gap-analysis.md | ||
| plan.md | ||
| schema.md | ||