Package jaegertracing provides middleware to Opentracing using Jaeger.

    Example: “` package main import (


    ) func main() {

    e := echo.New()
    // Enable tracing middleware
    c := jaegertracing.New(e, nil)
    defer c.Close()

    } “`



    This section is empty.


    View Source
    var (
    	// DefaultTraceConfig is the default Trace middleware config.
    	DefaultTraceConfig = TraceConfig{
    		Skipper: middleware.DefaultSkipper,
    		// contains filtered or unexported fields


    func CreateChildSpan

    func CreateChildSpan(ctx echo.Context, name string) opentracing.Span

      CreateChildSpan creates a new opentracing span adding tags for the span name and caller details. User must call defer `sp.Finish()`

      func New

      func New(e *echo.Echo, skipper middleware.Skipper) io.Closer

        New creates an Opentracing tracer and attaches it to Echo middleware. Returns Closer do be added to caller function as `defer closer.Close()`

        func Trace

        func Trace(tracer opentracing.Tracer) echo.MiddlewareFunc

          Trace returns a Trace middleware.

          Trace middleware traces http requests and reporting errors.

          func TraceFunction

          func TraceFunction(ctx echo.Context, fn interface{}, params ...interface{}) (result []reflect.Value)

            TraceFunction wraps funtion with opentracing span adding tags for the function name and caller details

            func TraceWithConfig

            func TraceWithConfig(config TraceConfig) echo.MiddlewareFunc

              TraceWithConfig returns a Trace middleware with config. See: `Trace()`.


              type TraceConfig

              type TraceConfig struct {
              	// Skipper defines a function to skip middleware.
              	Skipper middleware.Skipper
              	// OpenTracing Tracer instance which should be got before
              	Tracer opentracing.Tracer
              	// contains filtered or unexported fields

                TraceConfig defines the config for Trace middleware.

                Source Files