Span Assessments
SpanAssessmentsResource
Methods
Attach a new assessment to a span within a trace.
A span assessment records feedback on a single span's output. Its assessment_type selects one of comment, rating (an integer 1-5), approval (approved or rejected), rubric (key-value rule pairs), metadata (arbitrary JSON), or overwrite (a corrected span output), and exactly the content field matching that type must be supplied; a free-text comment may additionally accompany any type. trace_id is required, while span_id is optional and, when omitted, the assessment is attached to the trace's root span. The call returns 404 if the given span_id and trace_id do not identify an existing span, or if no root span is found for the trace. At most one user per span may hold an overwrite assessment, so creating an overwrite for a span another user has already overwritten returns 409. Use the list endpoint to read a span's or trace's existing assessments.
Retrieve a single span assessment by its identifier.
Returns the assessment's type and content fields, the span and trace it is attached to, and the identity that created it. Returns 404 if no assessment with that id exists for the caller's account. Use the list endpoint instead when you have a span or trace id rather than an assessment id.
Return the assessments attached to a given span or trace.
Results are scoped to the caller's account. Exactly one of span_id or trace_id must be supplied as a query parameter, and a request providing neither returns 400. Filtering by trace_id returns assessments across every span of that trace, whereas span_id returns only that span's assessments; an optional assessment_type narrows the results to a single type. Use the get-by-id endpoint when you already have a specific assessment id.
Filter by assessment type
Filter by span ID. Either span_id or trace_id must be provided as a query parameter.
Filter by trace ID. Either span_id or trace_id must be provided as a query parameter.
Unique identifier for the assessment
Type of assessment
User who submitted the assessment
The span this assessment is attached to
The trace this assessment is attached to
Account this assessment belongs to
Approval status (approved/rejected)
Raw text feedback
When this assessment was created
Arbitrary JSON object for additional data
User corrections to span output
Numerical rating (1-5)
Rule key-value pairs for rubric evaluation
When this assessment was last updated
Update the content of an existing span assessment.
Only the assessment's original creator may update it; a request from any other identity returns 403. Supplied fields overwrite the stored values and the merged result is re-validated against the assessment's type, so the content must stay consistent with assessment_type (the matching content field present and no conflicting fields set) or the call returns 422. The span and trace an assessment is attached to cannot be changed through this endpoint. Returns 404 if no assessment with that id exists for the caller's account.
Permanently delete a span assessment by its identifier.
This is a hard delete: the assessment row is removed rather than archived, so it cannot be restored afterward. The response echoes the deleted assessment's id. Returns 404 if no assessment with that id exists for the caller's account.
Domain types
Status options for approval assessments
Types of assessments that can be provided
Response model for span assessment