middleware

package
v0.0.0-...-6c3b1c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CtxTraceId = "trace_id"
)

Functions

func Tracer

func Tracer(collector *tracePkg.Collector) usrv.EndpointOption

The tracer middleware emits TraceEntry objects to the supplied Collector whenever the server processes an incoming request.

Two Trace entries will be emitted for each request, one for the incoming request and one for the outgoing response.

The middleware will inject a traceId for each incoming request into the context that gets passed to the request handler. To ensure that any further RPC requests that occur inside the wrapped handler are associated with the current request, the handler should pass its context to any performed RPC client requests.

This function is designed to emit events in non-blocking mode. If the Collector does not have enough capacity to store a generated TraceEntry then it will be silently dropped.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL