forked from mtusi2026/mtusi2026lab6
feat: add bounded observability and verified SLO incident alerts
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package objectstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab6/internal/observation"
|
||||
)
|
||||
|
||||
// WithTracer binds optional operation tracing without exposing credentials or object keys.
|
||||
func (c *Client) WithTracer(tracer observation.Tracer) *Client {
|
||||
c.tracer = tracer
|
||||
return c
|
||||
}
|
||||
|
||||
// start records only the stable S3 operation name.
|
||||
func (c *Client) start(ctx context.Context, operation string) (context.Context, func(error)) {
|
||||
if c.tracer != nil {
|
||||
return c.tracer.Start(ctx, operation, "client")
|
||||
}
|
||||
return ctx, func(error) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user