Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientObservabilityMiddleware ¶
type ClientObservabilityMiddleware struct {
// contains filtered or unexported fields
}
ClientObservabilityMiddleware is an http client middleware for logging, metrics, and tracing
func NewClientObservabilityMiddleware ¶
func NewClientObservabilityMiddleware(logger *log.Logger, mf *metrics.Factory, tracer opentracing.Tracer) *ClientObservabilityMiddleware
NewClientObservabilityMiddleware creates a new instance of http client middleware for observability
type ResponseWriter ¶
type ResponseWriter struct { http.ResponseWriter StatusCode int StatusClass string }
ResponseWriter extends the functionality of standard http.ResponseWriter
func NewResponseWriter ¶
func NewResponseWriter(rw http.ResponseWriter) *ResponseWriter
NewResponseWriter creates a new response writer
func (*ResponseWriter) WriteHeader ¶
func (r *ResponseWriter) WriteHeader(statusCode int)
WriteHeader overrides the default implementation of http.WriteHeader
type ServerObservabilityMiddleware ¶
type ServerObservabilityMiddleware struct {
// contains filtered or unexported fields
}
ServerObservabilityMiddleware is an http server middleware for logging, metrics, and tracing
func NewServerObservabilityMiddleware ¶
func NewServerObservabilityMiddleware(logger *log.Logger, mf *metrics.Factory, tracer opentracing.Tracer) *ServerObservabilityMiddleware
NewServerObservabilityMiddleware creates a new instance of http server middleware for observability
func (*ServerObservabilityMiddleware) Wrap ¶
func (m *ServerObservabilityMiddleware) Wrap(next http.HandlerFunc) http.HandlerFunc
Wrap accepts an http handler and return a new http handler that takes care of logging, metrics, and tracing