Documentation ¶
Index ¶
- Variables
- func DefaultURI(r *http.Request) string
- func NewClient(ca []byte) *http.Client
- func ServerMiddleware(opts ...Option) func(next http.Handler) http.Handler
- func ServerMiddlewareAll(opts ...Option) func(next http.Handler) http.Handler
- func UpdateClient(c *http.Client, opts ...Option) *http.Client
- type Option
- type PathExtractor
- type TracedServeMux
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DefaultURI ¶ added in v2.0.7
func ServerMiddleware ¶ added in v2.0.4
ServerMiddleware perform: * telemetry log injection * measure execution time * recovery
func ServerMiddlewareAll ¶ added in v2.0.4
ServerMiddlewareAll represent all essential metrics Execution order:
- opentracing injection via nethttp.Middleware
- recovery + measure execution time + debug log via own ServerMiddleware
- metrics via metrics.NewHTTPMiddlewareWithOption
Types ¶
type Option ¶ added in v2.0.4
type Option interface {
// contains filtered or unexported methods
}
Option interface used for setting optional config properties.
func WithOperation ¶ added in v2.0.4
func WithOtelOpts ¶ added in v2.0.4
func WithPathExtractor ¶ added in v2.0.7
func WithPathExtractor(in PathExtractor) Option
type PathExtractor ¶ added in v2.0.7
type TracedServeMux ¶ added in v2.0.7
type TracedServeMux struct {
// contains filtered or unexported fields
}
TracedServeMux is a wrapper around http.ServeMux that instruments handlers for tracing.
func NewServeMux ¶ added in v2.0.7
func NewServeMux(opts ...Option) *TracedServeMux
NewServeMux creates a new TracedServeMux.
func (*TracedServeMux) Handle ¶ added in v2.0.7
func (tm *TracedServeMux) Handle(pattern string, handler http.Handler)
Handle implements http.ServeMux#Handle
func (*TracedServeMux) ServeHTTP ¶ added in v2.0.7
func (tm *TracedServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.ServeMux#ServeHTTP
Click to show internal directories.
Click to hide internal directories.