Class TraceController

java.lang.Object
dev.dokimos.server.controller.v1.TraceController

@RestController @RequestMapping("/api/v1/traces") public class TraceController extends Object
OTLP trace ingestion and read endpoints. Ingestion accepts both the JSON (application/json) and protobuf (application/x-protobuf) encodings of ExportTraceServiceRequest, which converge on the same internal shape, so span counts, derived input/output, and project linking match across them. Writes pass through the API key auth filter; reads are open.
  • Constructor Details

  • Method Details

    • ingestTraces

      @PostMapping(consumes="application/json") public TraceIngestResponse ingestTraces(@RequestBody OtlpExportTraceServiceRequest request)
      Ingests an OTLP/HTTP JSON trace export. Valid spans are persisted; malformed spans are skipped and counted. Returns 200 with the accepted/rejected span counts and the number of traces touched even when some spans were rejected.
    • ingestTracesProtobuf

      @PostMapping(consumes={"application/x-protobuf","application/protobuf"}) public TraceIngestResponse ingestTracesProtobuf(@RequestBody byte[] body)
      Ingests an OTLP protobuf trace export. The binary ExportTraceServiceRequest body is decoded and mapped onto the same internal shape the JSON path uses. A body that is not a valid request yields 400.
    • listTraces

      @GetMapping public PageResponse<TraceSummary> listTraces(@RequestParam(required=false) UUID projectId, @RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="50") int size, jakarta.servlet.http.HttpServletRequest http)
      Lists ingested traces newest first, optionally filtered to a project.
    • getTrace

      @GetMapping("/{id}") public TraceDetail getTrace(@PathVariable UUID id, jakarta.servlet.http.HttpServletRequest http)
      Returns a single trace with its spans and online eval jobs, or 404 if it does not exist or belongs to another tenant.