Class TraceEvalEnqueuer

java.lang.Object
dev.dokimos.server.service.TraceEvalEnqueuer

@Component public class TraceEvalEnqueuer extends Object
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 Details

  • Method Details

    • enqueueForTrace

      public int enqueueForTrace(Trace trace)
      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