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
+30
View File
@@ -0,0 +1,30 @@
package objectstore
import (
"context"
"testing"
)
type tracerFixture struct {
operation string
finished bool
}
// Start records a stable operation name and closes it through the returned callback.
func (f *tracerFixture) Start(ctx context.Context, name, _ string) (context.Context, func(error)) {
f.operation = name
return ctx, func(error) {
f.finished = true
}
}
// TestObjectObservationOmitsCoordinates keeps bucket keys and credentials outside the tracer boundary.
func TestObjectObservationOmitsCoordinates(t *testing.T) {
tracer := &tracerFixture{}
client := (&Client{}).WithTracer(tracer)
_, finish := client.start(t.Context(), "s3.put")
finish(nil)
if tracer.operation != "s3.put" || !tracer.finished {
t.Fatal("operation span missing")
}
}