Documentation ¶
Index ¶
- func NewRequestContextLoggers(svcLogger svc1log.Logger, evtLogger evt2log.Logger, ...) wrouter.RequestHandlerMiddleware
- func NewRequestContextMetricsRegistry(metricsRegistry metrics.Registry) wrouter.RequestHandlerMiddleware
- func NewRequestExtractIDs(svcLogger svc1log.Logger, trcLogger trc1log.Logger, ...) wrouter.RequestHandlerMiddleware
- func NewRequestMetricRequestMeter(mr metrics.RootRegistry) wrouter.RouteHandlerMiddleware
- func NewRequestPanicRecovery(svcLogger svc1log.Logger, evtLogger evt2log.Logger) wrouter.RequestHandlerMiddleware
- func NewRouteLogTraceSpan() wrouter.RouteHandlerMiddleware
- func NewRoutePanicRecovery() wrouter.RouteHandlerMiddleware
- func NewRouteRequestLog(reqLogger req2log.Logger, baseParamPerms req2log.RequestParamPerms) wrouter.RouteHandlerMiddleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequestContextLoggers ¶
func NewRequestContextLoggers( svcLogger svc1log.Logger, evtLogger evt2log.Logger, auditLogger audit2log.Logger, metricLogger metric1log.Logger, diagLogger diag1log.Logger, ) wrouter.RequestHandlerMiddleware
NewRequestContextLoggers is request middleware that sets loggers that can be retrieved from a context on the request context.
func NewRequestContextMetricsRegistry ¶
func NewRequestContextMetricsRegistry(metricsRegistry metrics.Registry) wrouter.RequestHandlerMiddleware
NewRequestContextMetricsRegistry is request middleware that sets the metrics registry on the request context.
func NewRequestExtractIDs ¶
func NewRequestExtractIDs( svcLogger svc1log.Logger, trcLogger trc1log.Logger, tracerOptions []wtracing.TracerOption, idsExtractor extractor.IDsFromRequest, ) wrouter.RequestHandlerMiddleware
func NewRequestMetricRequestMeter ¶
func NewRequestMetricRequestMeter(mr metrics.RootRegistry) wrouter.RouteHandlerMiddleware
func NewRequestPanicRecovery ¶
func NewRequestPanicRecovery(svcLogger svc1log.Logger, evtLogger evt2log.Logger) wrouter.RequestHandlerMiddleware
NewRequestPanicRecovery returns a middleware which recovers panics in the wrapped handler. It accepts loggers as arguments, as we are not guaranteed they have been set on the request context. These loggers are only used in the case of a panic. When this is the outermost middleware, some request information (e.g. trace ids) will not be set.
func NewRouteLogTraceSpan ¶
func NewRouteLogTraceSpan() wrouter.RouteHandlerMiddleware
func NewRoutePanicRecovery ¶ added in v2.4.0
func NewRoutePanicRecovery() wrouter.RouteHandlerMiddleware
NewRoutePanicRecovery returns a middleware which recovers panics within the inner route handler. This is distinct from NewRequestPanicRecovery in that it runs when all logging/telemetry are configured on the request.
func NewRouteRequestLog ¶
func NewRouteRequestLog(reqLogger req2log.Logger, baseParamPerms req2log.RequestParamPerms) wrouter.RouteHandlerMiddleware
Types ¶
This section is empty.