MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / write_trace_with_timeout

Function write_trace_with_timeout

app/api/agentops/exporter/processor.py:480–491  ·  view source on GitHub ↗

Write a trace to ClickHouse with a timeout

(trace: Trace)

Source from the content-addressed store, hash-verified

478
479
480async def write_trace_with_timeout(trace: Trace) -> None:
481 """Write a trace to ClickHouse with a timeout"""
482 try:
483 write_task = asyncio.create_task(clickhouse_create_trace(trace))
484 await asyncio.wait_for(write_task, timeout=TIMEOUT)
485 return True
486 except asyncio.TimeoutError:
487 write_dropped_record('trace', trace.id, "Timeout")
488 return False
489 except Exception as e:
490 write_dropped_record('trace', trace.id, str(e))
491 return False
492
493
494async def process_page(offset: int, limit: int) -> None:

Callers 1

process_pageFunction · 0.85

Calls 2

clickhouse_create_traceFunction · 0.85
write_dropped_recordFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…