Documentation Index
Fetch the complete documentation index at: https://evalgate.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Traces API — ingest and query LLM traces
Ingest LLM traces via the batch collector or direct CRUD endpoints, add spans, and query traces by status or name for analysis and evals.Traces give Evalgate visibility into your LLM calls in production. Each trace represents a single request-response unit (or multi-step workflow), and each span inside it captures a discrete operation — an LLM call, a retrieval step, or a tool invocation. Use the collector endpoint for high-volume production ingestion, and the direct trace and span endpoints for lower-volume or programmatic workflows.
POST /api/collector — batch ingest (recommended)
The collector endpoint accepts a batch of traces in a single authenticated request. It applies sampling rules before writing — 10% of successful traces are sampled, while 100% of error traces are always captured. This is the recommended path for mirroring production traffic into Evalgate.The collector processes the batch transactionally. All traces in a batch either succeed or fail together.
GET /api/traces — list traces
Returns traces for the authenticated organization. Supports filtering and pagination.Query parameters
Maximum number of traces to return. Defaults to 50, maximum 100.
Number of results to skip for pagination. Defaults to 0.
Filter by trace status:
pending, success, or error.Filter by trace name using a partial match (LIKE search).
Response
POST /api/traces — create a trace
Creates a single trace record directly.Request body
Display name for this trace.
Unique identifier string you assign. Use a stable, reproducible ID so you can correlate traces with your own request logs.
Numeric ID of the organization that owns this trace.
Initial status:
pending, success, or error. Defaults to pending.End-to-end duration of the traced operation in milliseconds.
Arbitrary JSON object. Use this to store model name, user ID, session ID, or any context useful for filtering in the dashboard.
Response (201)
GET /api/traces/ — get trace details
Returns a single trace along with all of its spans.Path parameters
Numeric ID of the trace to retrieve.
Response
The trace record.
All spans attached to this trace, ordered by
startTime.POST /api/traces//spans — add a span
Adds a span to an existing trace.Path parameters
Numeric ID of the parent trace.
Request body
Display name for this span.
Unique identifier string you assign to this span.
Span type:
llm, tool, or retrieval.ISO 8601 timestamp when the span started.
The input to this operation (prompt, query, tool arguments, etc.).
The output from this operation (completion, result, retrieved text, etc.).
Arbitrary JSON for additional context such as token counts, latency, or model name.