forked from mtusi2026/mtusi2026lab6
feat: add bounded observability and verified SLO incident alerts
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package observation
|
||||
|
||||
// Snapshot describes bounded persistence saturation without record identifiers.
|
||||
type Snapshot struct {
|
||||
// QueueDepth counts accepted unfinished jobs in the current pipeline version.
|
||||
QueueDepth int64
|
||||
// OldestSeconds measures time since the oldest durable acceptance.
|
||||
OldestSeconds float64
|
||||
// PoolUsed counts checked-out database connections.
|
||||
PoolUsed int64
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Package observation defines optional consumer-owned instrumentation boundaries.
|
||||
package observation
|
||||
|
||||
import "context"
|
||||
|
||||
// Tracer starts bounded spans without exposing an SDK provider to business logic.
|
||||
type Tracer interface {
|
||||
// Start creates an operation span and a completion callback accepting its result.
|
||||
Start(context.Context, string, string) (context.Context, func(error))
|
||||
}
|
||||
Reference in New Issue
Block a user