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

Function count_v2_sourced_rows

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

Count the number of rows in the v2 sourced table

()

Source from the content-addressed store, hash-verified

347
348
349async def count_v2_sourced_rows() -> int:
350 """Count the number of rows in the v2 sourced table"""
351 clickhouse_client = await get_async_clickhouse()
352 query = """
353 SELECT COUNT(1) FROM otel_2.otel_traces
354 WHERE mapContains(SpanAttributes, 'session.id')
355 """
356 result = await clickhouse_client.query(query)
357 return result.result_rows[0][0]
358
359
360class _ClickhouseDriverContextShim:

Callers

nothing calls this directly

Calls 1

get_async_clickhouseFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…