Package dev.dokimos.server.service
Class TraceEvalEnqueuer
java.lang.Object
dev.dokimos.server.service.TraceEvalEnqueuer
Decides which online eval jobs to create for a freshly ingested trace and persists them. A job is
enqueued for every (span, enabled rule) pair where the span matches the rule and the span has a
non-blank derived output to score. The matching logic lives on
TraceEvalRule.matches(dev.dokimos.server.entity.TraceSpan) and is
unit tested directly.-
Constructor Summary
ConstructorsConstructorDescriptionTraceEvalEnqueuer(TraceEvalRuleRepository ruleRepository, TraceEvalJobRepository jobRepository) -
Method Summary
Modifier and TypeMethodDescriptionintenqueueForTrace(Trace trace) Enqueues online eval jobs for a persisted trace.
-
Constructor Details
-
TraceEvalEnqueuer
public TraceEvalEnqueuer(TraceEvalRuleRepository ruleRepository, TraceEvalJobRepository jobRepository)
-
-
Method Details
-
enqueueForTrace
Enqueues online eval jobs for a persisted trace. Does nothing when the trace has no resolved project, since rules are scoped per project. Must be called inside the ingestion transaction so the spans are managed entities.- Parameters:
trace- the persisted trace with managed spans- Returns:
- the number of jobs enqueued
-