Open Talento90 opened 5 years ago
It seems that using GetStartOptions
it ignores the OPTIONS
method but not the "/" path :(
Handler: &ochttp.Handler{
Handler: router,
GetStartOptions: func(r *http.Request) trace.StartOptions {
if r.Method == http.MethodOptions || r.URL.Path == "/" {
return trace.StartOptions{
Sampler: trace.NeverSample(),
SpanKind: trace.SpanKindServer,
}
}
return trace.StartOptions{
Sampler: trace.AlwaysSample(),
SpanKind: trace.SpanKindServer,
}
},
},
First of all thanks for this amazing project. I am using tracing to stackdriver and I would like to know How can I ignore http
OPTION
method and also some specific paths like/swagger
or/
.For your info I am using
ochttp
to instrument my http server.