Documentation
¶
Index ¶
- Variables
- func Apply(c *http.Client)
- func GetContextId(ctx context.Context) string
- func GetRequestId(r *http.Request) string
- func NewFunc(f func(w http.ResponseWriter, r *http.Request)) func(http.ResponseWriter, *http.Request)
- func NewHandler(h http.Handler) http.Handler
- func SetRequestId(r *http.Request) *http.Request
- type ContextKey
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRequestHeader = "X-Request-ID"
Functions ¶
func GetContextId ¶ added in v0.1.1
GetContextId extracts the request ID from the given context
func GetRequestId ¶
GetRequestId extracts the request ID from the current request context
func NewFunc ¶
func NewFunc(f func(w http.ResponseWriter, r *http.Request)) func(http.ResponseWriter, *http.Request)
NewFunc provides an HTTP HandlerFunc for injecting trace information
func NewHandler ¶ added in v0.2.0
Tracer provides an HTTP handler for injecting trace information
Types ¶
type ContextKey ¶ added in v0.3.0
type ContextKey int
const ( // Deprecated: replaced by concrete type ContextKey DefaultContextKey = "id" ContextKeyID ContextKey = iota )
Click to show internal directories.
Click to hide internal directories.