Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultComponentName = "emicklei/go-restful"
View Source
const DefaultOperationName = "go-restful client"
Variables ¶
View Source
var (
DefaultOperationNameFunc = func(r *restful.Request) string {
return r.SelectedRoutePath()
}
)
Functions ¶
func NewOTFilter ¶
func NewOTFilter(tracer opentracing.Tracer, options ...FilterOption) restful.FilterFunction
NewOTFilter returns a go-restful filter which add OpenTracing instrument
Types ¶
type FilterOption ¶
type FilterOption func(*filterOptions)
FilterOption controls the behavior of the Filter.
func ComponentName ¶
func ComponentName(componentName string) FilterOption
ComponentName returns a FilterOption that sets the component name name for the server-side span.
func OperationNameFunc ¶
func OperationNameFunc(f func(r *restful.Request) string) FilterOption
OperationNameFunc returns a FilterOption that uses given function f to generate operation name for each server-side span.
Click to show internal directories.
Click to hide internal directories.