Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AllowLocal = trace.AuthRequest AllowAny = func(r *http.Request) (any, sensitive bool) { return true, true } )
Functions ¶
func HTTPHandler ¶
func HTTPHandler(c *Contextor) http.HandlerFunc
HTTPHandler returns an HTTP handler that can be used to enable or disable the tracing.
func NewContext ¶
NewContext returns a copy of the parent context and associates it with a Trace.
func Traces ¶
func Traces(auth Authorizer) http.HandlerFunc
Traces returns an HTTP handler, which will respond with traces from the program.
The handler performs authorization by running auth.
Types ¶
type Authorizer ¶
Authorizer determines whether a specific request is permitted to load the /debug/requests or /debug/events pages.
type Contextor ¶
type Contextor struct {
// contains filtered or unexported fields
}
Contextor is a context manager.
func NewContextor ¶
func NewContextor() *Contextor
func (*Contextor) HTTPToContext ¶
func (c *Contextor) HTTPToContext(family, title string) kithttp.RequestFunc
HTTPToContext returns an http RequestFunc that associates ctx with a Tracer.
Click to show internal directories.
Click to hide internal directories.