-
[OPIK-7016] [BE] feat: extract cipx session_id into cipx_trace_identities (#7336)
发布于
2026-07-03 13:18:51 +00:00 - [OPIK-7016] [BE] feat: extract cipx session_id into cipx_trace_identities
Adds a session_id column to cipx_trace_identities (migration 000095) and
populates it at ingestion from metadata.cipx.session.session_id, so distinct
session_id per user gives the number of Claude Code sessions for the self (/me)
AI-spend summary. cipx also mirrors this value onto the trace's native thread_id.- Migration: ALTER TABLE cipx_trace_identities ADD COLUMN session_id String.
- CipxTraceIdentityDAO: extract session_id and include it in the insert.
- Cover the new column in CostIntelligenceIngestionTest.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- chore(migration): end 000095 with a trailing blank line
Conform to .agents/skills/opik-backend/migrations.md ("always end with empty line").
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com
下载附件