middleware

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Panic

func Panic(h http.Handler) http.Handler

Panic logs any panics. For now, we're continue throwing the panic up the stack so this may crash the process.

func Tracing

func Tracing(h http.Handler) http.Handler

Tracing creates a new span named after the URL path of the request. It places this span in the request context, for use by other handlers via opentracing.SpanFromContext() If a span exists in request headers, the span created by this middleware will be a child of that span.

func WithTracingOpName added in v1.2.1

func WithTracingOpName(ctx context.Context, opName string) context.Context

WithTracingOpName adds the op name to a context for use by the tracing library. It uses a pointer because it's called below in the stack and the only way to pass the info up is to have it a set a pointer. Even though it doesn't change the context we still have this return a context to maintain the illusion.

Types

This section is empty.

Jump to

Keyboard shortcuts

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