{"ok":true,"data":{"trace":{"id":"4b8b20c4-6c56-4c32-9901-a987e28a3ccf","trace_id":"jTslUM5xwVI1I4h6","name":"SQL Query: SELECT COUNT(*)::int AS orphan_spans...","description":"Database Query Execution","session_id":"_Ae6dkqYsMTv_3uc","source_domain":null,"source_site_id":null,"agent_name":null,"model_name":null,"status":"completed","start_time":"2026-05-22T21:35:41.555Z","end_time":"2026-05-22T21:35:41.732Z","duration_ms":177,"total_spans":1,"total_tool_calls":0,"total_tokens_used":0,"error_count":0,"retry_count":0,"ai_summary":null,"ai_health_score":null,"ai_anomalies":[],"ai_suggestions":[],"ai_analyzed_at":null,"network_percentile":null,"similar_trace_ids":null,"is_public":true,"share_token":"req_mphfv5xs_fkf74ku","annotations_count":0,"metadata":{"query":"\n        SELECT COUNT(*)::int AS orphan_spans\n        FROM spans child\n        LEFT JOIN spans parent\n          ON parent.span_id = child.parent_span_id\n          AND parent.trace_id = child.trace_id\n        WHERE child.parent_span_id IS NOT NULL\n          AND parent.span_id IS NULL\n      ","durationMs":177},"tags":[],"fingerprint_hash":"bcafa43b0bd19b1ac202c6e0f3dd84e56e2acf07bd2c42e0a8ff62b754206f9d","created_at":"2026-05-22T21:35:41.800Z","updated_at":"2026-05-22T21:35:41.800Z"},"completion":{"completionStatus":"completed","reason":"All required spans are complete or explicitly optional/not applicable.","algorithmVersion":"trace-completion-v2.5.0","computedAt":"2026-05-26T02:06:56.402Z","expectedSpans":["PVTY7BpS"],"completedSpans":["PVTY7BpS"],"missingSpans":[],"pendingSpans":[],"lateSpans":[],"orphanSpans":[],"failedSpans":[],"optionalSpans":[],"notApplicableSpans":[],"counts":{"expected":1,"completed":1,"pending":0,"missing":0,"failed":0,"late":0,"orphan":0,"optional":0,"notApplicable":0}},"storage":"database"}}