It is solid to use retrieve the method directly from the request.
Co-authored-by: George MacRorie <gmacrorie@influxdata.com>
Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
I think it is a nice utility function that I would like to use
elsewhere.
So I decided to move it out to the tracing package.
Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
* feat(tracing): dont trace spans with full URL path names in ExtractFromHTTPRequest
* chore(multiple): replace all occurrences of julienschmidt/httprouter with influxdata/httprouter
* fix: Use simple function name for tracing operation name
Every span has an operation name, which shows up in multiple places in
the Jaeger UI. Verbose function names like
`github.com/influxdata/influxdb/kit/tracing.StartSpanFromContext`
are not readable in this UI. Shorter function names like
`StartSpanFromContext` improve UX. Context is not lost because (1) the
filename and line number are logged with the span and (2) spans are
understood in the context of other spans, marked with service name and
operation name.
Extra cost is ~22 ns per call to StartSpanFromContext. No additional
memory is allocated.
* goimports
* slice more than function name as span operatio name