example with sla
kamilsk opened this issue · comments
Kamil Samigullin commented
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
}
})
}