-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I have code that looks like:
import (
"net/http"
"go.opencensus.io/trace"
)
func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
defer func() {
span := trace.FromContext(r.Context())
_ = span
}()
h.wrappedHandler.ServeHTTP(w, r)
}
I get this error:
file.go:71:28: Non-inherited new context, use function like `context.WithXXX` instead (contextcheck)
span := trace.FromContext(r.Context())
^
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested