Documentation
¶
Overview ¶
Package observability provides the read-side surface for the Phase 7 observability contract: every execution exposes a full correlation chain (Workflow → Step → Task → Run → Attempt → Model/Tool Call → Memory → Result) plus the core metrics the platform guarantees.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Percentile ¶
Percentile computes the p-th percentile of sorted values (0 ≤ p ≤ 100).
func ValidateCorrelation ¶
func ValidateCorrelation(c ExecutionCorrelation) []string
ValidateCorrelation asserts the chain invariants: every step's task exists among the tasks; every attempt's task exists; every model/tool call links to a task; every memory record links to a task or attempt. Returns a list of broken invariants (empty = valid).
Types ¶
type AttemptNode ¶
type ExecutionCorrelation ¶
type ExecutionCorrelation struct {
Workflow WorkflowNode
Steps []StepNode
Tasks []TaskNode
Attempts []AttemptNode
ModelCalls []ModelCallNode
ToolCalls []ToolCallNode
Memories []MemoryNode
AuditEvents []AuditNode
RuntimeOperationReceipts int
}
ExecutionCorrelation is the full trace of one workflow execution.
type MemoryNode ¶
type Metrics ¶
type Metrics struct {
WorkflowCount, WorkflowSucceeded, WorkflowFailed int
TaskCount, TaskSucceeded, TaskFailed int
ModelCalls, ToolCalls, MemoryRecords int
AuditEvents, Receipts int
WorkflowSuccessRate, TaskSuccessRate float64
SchedulingLatencyMillis Percentiles
RetryRate, RecoveryRate float64
BudgetDrift bool // reserved != settled tokens
CapacityDrift int // ACTIVE reservations remaining
DuplicateSideEffects int // tool_calls EXECUTED more than once for the same (task, tool, args)
CrossTenantViolations int // rows in other tenants referencing this workflow's resources
}
Metrics is the aggregated platform health surface (§Phase-7 core metrics).
type ModelCallNode ¶
type ModelCallNode struct {
TaskID, RunID, AttemptID, ModelRef, Status string
}
type Percentiles ¶
type Percentiles struct {
P50, P95, P99 float64
}
type ToolCallNode ¶
type ToolCallNode struct {
TaskID, RunID, AttemptID, ToolName, Action, Status string
}