Skip to content

example with sla #4

@kamilsk

Description

@kamilsk
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
    }
  })
}

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions