feat: add bounded observability and verified SLO incident alerts

This commit is contained in:
Vladislav Agapov
2026-10-29 18:01:11 +03:00
parent 470d9d6f1e
commit 6c7601802d
325 changed files with 24988 additions and 44 deletions
@@ -0,0 +1,22 @@
package fiber
import (
"context"
"time"
)
// HTTPObserver consumes only safe transport metadata and W3C context.
type HTTPObserver interface {
// Start begins a server operation and returns its completion callback.
Start(context.Context, string, string) (context.Context, func(error))
// Extract restores the upstream W3C parent without baggage.
Extract(context.Context, string, string) context.Context
// HTTP observes the completed response using a route template.
HTTP(context.Context, string, string, int, time.Duration, string)
}
// WithObserver installs optional instrumentation before the HTTP listener starts.
func (ctrl *Controller) WithObserver(observer HTTPObserver) *Controller {
ctrl.observer = observer
return ctrl
}