Package dev.dokimos.server.service
Class TraceIngestService
java.lang.Object
dev.dokimos.server.service.TraceIngestService
Persists OTLP traces and enqueues online evaluations for matching spans. The parse and persist run in
one synchronous transaction per request, which is sufficient for v1.
For high ingest volume this is where an async write path would go: the controller would hand the decoded request to a bounded queue and return immediately, a pool of writers would drain it, and backpressure (a full queue) would surface as 429 to the client. The synchronous path is kept for v1 because it gives the caller an exact accepted/rejected count and the simplest failure semantics.
-
Constructor Summary
ConstructorsConstructorDescriptionTraceIngestService(OtlpTraceParser parser, TraceRepository traceRepository, ProjectRepository projectRepository, TraceEvalEnqueuer evalEnqueuer, TraceProperties properties) -
Method Summary
Modifier and TypeMethodDescriptioningest(OtlpExportTraceServiceRequest request) Parses, persists, and schedules online evals for an OTLP request.
-
Constructor Details
-
TraceIngestService
public TraceIngestService(OtlpTraceParser parser, TraceRepository traceRepository, ProjectRepository projectRepository, TraceEvalEnqueuer evalEnqueuer, TraceProperties properties)
-
-
Method Details
-
ingest
Parses, persists, and schedules online evals for an OTLP request. Malformed spans are skipped and counted; a batch with rejected spans still succeeds.- Parameters:
request- the decoded OTLP request- Returns:
- the accepted/rejected span counts and the number of traces touched
-