Skip to main content
Diagnosis applies configured checks to evidence already collected. Task completion, saved details and quality scores have distinct conditions; an empty BadCase list cannot establish that an execution was correct. For a first hands-on run, start with a quick check. The objects used here are distinct: a Diagnoser defines a check, a Dataset configures data selection, a Job configures repeatable work, a Task is one execution, and a DiagnosisRecord is an individual result. Creating a Job and completing an execution are separate events.

From Task to results

Diagnosis reads and result writesDiagnosis reads and result writes

Diagnosis reads and result writes

Select the diagram to open the full-size SVG in a new tab. Master and Worker are runtime roles of AgentLens instances. An OceanBase lease elects the Master, which schedules, dispatches and rescues tasks. A Worker’s Runner executes each Task. The export box is a responsibility inside Runner, not a separate deployed service.

Execution steps

  1. Restore the Task execution snapshot and resolve its Job, Dataset, diagnosers and query window.
  2. Read candidate traces and lightweight fields from SigNoz telemetry tables. An optional Selector chooses the shared sample set.
  3. Run pre_evaluate to decide final, skip or further evaluation. Hydrate complete traces only when required.
  4. Build one shared runtime projection for the trace. Rules that require only raw spans can continue to use that raw data.
  5. Execute Rule or LLM checks, accumulate statistics, then construct DiagnosisRecords according to the save policy.
  6. Commit terminal state with worker and attempt checks. Export terminal TaskStats only after terminal compare-and-set (CAS) succeeds.
Rule checks execute locally. LLM checks call the configured model connection. Each diagnoser defines required fields and whether missing semantics cause a skip or failure. Results are investigation clues to verify against the trace.

Reads and writes use different channels

When platform-issued ingestion is configured, AgentLens requests a short-lived token from Django for the persisted Job’s Space and Agent, then exports directly to the gateway. Django issues credentials without receiving or forwarding the diagnosis body on this path.

Why success may yield no details or score

  • Details default to BAD only. Setting save_badcase_only to false also saves GOOD and FAILED results produced by full evaluation.
  • Final pre_evaluate results enter statistics only. Legal skips produce neither Metrics nor DiagnosisRecords.
  • Statistics accumulate before detail filtering. BadCase counts cannot reconstruct the full sample count.
  • Running statistics remain in Runner memory; the Task list is not a continuous progress feed.
  • v3 quality summaries require valid coverage. Skips, failures, missing coverage or incomplete source reads can leave a summary empty. Signal-only checks or no samples also produce no quality score.
See Diagnosis tasks for parameters and Quality analysis for metrics and review. This pipeline requires a SigNoz dataset; Langfuse observation support does not imply diagnosis support.