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

Function clickhouse_get_span_raw

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

Get raw span data from ClickHouse

(span_id: str)

Source from the content-addressed store, hash-verified

413
414
415async def clickhouse_get_span_raw(span_id: str) -> dict:
416 """Get raw span data from ClickHouse"""
417 client = await get_async_clickhouse()
418 query = """
419 SELECT * FROM {table_name}
420 WHERE SpanId = '{span_id}'
421 """
422 query = query.format(table_name=IMPORT_TABLE_NAME, span_id=span_id)
423 result = await client.query(query)
424 if result and hasattr(result, 'result_rows') and len(result.result_rows) > 0:
425 row_dict = dict(zip(result.column_names, result.result_rows[0]))
426 return row_dict
427
428 return None
429
430
431async def clickhouse_create_span(span: Span) -> None:

Callers 1

clickhouse_update_spanFunction · 0.85

Calls 2

get_async_clickhouseFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…