This guide explains the core data model for developers consuming AI observability data through Atla’s SDK and APIs. Our data model is built on OpenTelemetry standards and captures the complete lifecycle of AI applications from traces to custom metrics.
interface Trace { id: string; // Unique trace identifier environment: "PROD" | "DEV"; // Deployment environment // Execution metadata isSuccess: boolean | null; // Overall success status isCompleted: boolean; // Whether trace finished // Timing information startedAt: string; // Trace start time (ISO 8601) endedAt: string; // Trace completion time (ISO 8601) // Custom metadata metadata: { [key: string]: string } | null; // Custom trace metadata // Related data spans?: Span[]; // Individual AI operations customMetricValues?: CustomMetricValue[]; // Quality metrics}
Python:
Copy
Ask AI
{ "id": "trace_abc123", "environment": "PROD", # Execution metadata "isSuccess": True, # Can also be False or null "isCompleted": True, # Timing information "startedAt": "2024-01-15T10:30:00Z", "endedAt": "2024-01-15T10:32:30Z", # Custom metadata "metadata": {"user_id": "user_123", "session_type": "chat"}, # Can be null # Related data "spans": [...], # List of span objects "customMetricValues": [...] # Quality metrics}
interface SpanAnnotation { id: string; // Unique annotation ID spanId: string; // Target span reference // Issue classification failureMode: string; // Type of issue detected // Atla's AI analysis atlaCritique: string; // AI-generated explanation}
Python:
Copy
Ask AI
{ "id": "ann_ghi789", "spanId": "span_def456", # Issue classification "failureMode": "hallucination", # Atla's AI analysis "atlaCritique": "The model provided factually incorrect information about the weather API endpoint, suggesting a non-existent URL that would cause downstream failures."}
Custom Metrics capture quantitative quality measurements across traces, such as user satisfaction scores, factual accuracy ratings, or business-specific KPIs.