SDK: Provide an SDK for the services to generate traceIds and emit them.
POST /trace
req: service_name, start_ts, end_ts, traceId, meta)
resp: acknowledge success
GET /trace?service={service}&traceId={traceId}
resp: list[Trace]
GET /trace/list?service={service}&page_no=1
resp: list[Trace] + page_no + total_cnt
Data Model:
Trace:
start_ts, end_ts, traceId (uk), spanId, meta
Service Metadata:
id (pk), service_name, owner, org_id, etc.
How to Ingest:
The traceId is generated inside the service, and will flow along with the request via threadlocal or explicit context passing. The SDK provides the capability to support multi-thread/coroutine passing.
Trace Ingestion Data Flow:
Main Trace Processing Data Flow:
Trace Ingestion Gateway -> Kafka -> Cassandra DB -CDC-> Kafka -> Trace Processing Service -> ElasticSearch
Storage Est.
Cassandra: 1000_000_000 * 500 bytes * 400 = 800TB
MongoDB: 1000_000_000 * 100 bytes * 400 = 40 TB