tracer
tracer copied to clipboard
example with sla
func Middleware(handler http.Handler) http.Handler {
return http.HandlerFunc(func (...) {
ctx := context.WithValue(req.Context(), key, tracer)
http.ServeHTTP(rw, req.WithContex(ctx))
if ctx.Err() != nil {
// fetch tracer, write trace into Sentry
}
})
}