Skip to content

Span Assessments

Create span assessment
client.SpanAssessments.New(ctx, body) (*SpanAssessment, error)
POST/v5/span-assessments
Get span assessment by ID
client.SpanAssessments.Get(ctx, spanAssessmentID) (*SpanAssessment, error)
GET/v5/span-assessments/{span_assessment_id}
List span or trace assessments
client.SpanAssessments.List(ctx, query) (*APIListPage[SpanAssessment], error)
GET/v5/span-assessments
Update span assessment
client.SpanAssessments.Update(ctx, spanAssessmentID, body) (*SpanAssessment, error)
PATCH/v5/span-assessments/{span_assessment_id}
Permanently delete span assessment
client.SpanAssessments.Delete(ctx, spanAssessmentID) (*SpanAssessmentDeleteResponse, error)
DELETE/v5/span-assessments/{span_assessment_id}
ModelsExpand Collapse
type ApprovalStatus string

Status options for approval assessments

One of the following:
const ApprovalStatusApproved ApprovalStatus = "approved"
const ApprovalStatusRejected ApprovalStatus = "rejected"
type AssessmentType string

Types of assessments that can be provided

One of the following:
const AssessmentTypeComment AssessmentType = "comment"
const AssessmentTypeRating AssessmentType = "rating"
const AssessmentTypeApproval AssessmentType = "approval"
const AssessmentTypeRubric AssessmentType = "rubric"
const AssessmentTypeMetadata AssessmentType = "metadata"
const AssessmentTypeOverwrite AssessmentType = "overwrite"
type SpanAssessment struct{…}

Response model for span assessment

AssessmentID string

Unique identifier for the assessment

AssessmentType AssessmentType

Type of assessment

One of the following:
const AssessmentTypeComment AssessmentType = "comment"
const AssessmentTypeRating AssessmentType = "rating"
const AssessmentTypeApproval AssessmentType = "approval"
const AssessmentTypeRubric AssessmentType = "rubric"
const AssessmentTypeMetadata AssessmentType = "metadata"
const AssessmentTypeOverwrite AssessmentType = "overwrite"
CreatedBy string

User who submitted the assessment

SpanID string

The span this assessment is attached to

TraceID string

The trace this assessment is attached to

AccountID stringOptional

Account this assessment belongs to

Approval ApprovalStatusOptional

Approval status (approved/rejected)

One of the following:
const ApprovalStatusApproved ApprovalStatus = "approved"
const ApprovalStatusRejected ApprovalStatus = "rejected"
Comment stringOptional

Raw text feedback

CreatedAt TimeOptional

When this assessment was created

formatdate-time
Metadata map[string, any]Optional

Arbitrary JSON object for additional data

Object SpanAssessmentObjectOptional
Overwrite map[string, any]Optional

User corrections to span output

Rating int64Optional

Numerical rating (1-5)

maximum5
minimum1
Rubric map[string, string]Optional

Rule key-value pairs for rubric evaluation

UpdatedAt TimeOptional

When this assessment was last updated

formatdate-time