Documentation ¶
Index ¶
- func CurrentSpanFromContext(ctx context.Context) opentracing.Span
- func Execute(op string, r *http.Request, client *http.Client) (*http.Response, error)
- func NewPropagatingRoundTripper(rt http.RoundTripper) http.RoundTripper
- func TraceChildContext(ctx context.Context, op string, ...) (err error)
- func Tracing(service string, op string) startup_http.HttpMiddleware
- func WithSpanPropagation(client *http.Client) *http.Client
- type TracingOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentSpanFromContext ¶ added in v2.2.19
Returns the current span, or nil.
func NewPropagatingRoundTripper ¶
func NewPropagatingRoundTripper(rt http.RoundTripper) http.RoundTripper
func TraceChildContext ¶
func TraceChildContext(ctx context.Context, op string, fn func(ctx context.Context, span opentracing.Span) error) (err error)
Trace a child call while propagating the span using the context.
func Tracing ¶
func Tracing(service string, op string) startup_http.HttpMiddleware
Returns a middleware that adds tracing to an http handler. This will create a new and empty local storage for the current go routine to propagate the tracing context.
You can use the tracing middleware multiple time. Using it a second time will not start a new trace but will update 'service' and 'operation'.
Types ¶
type TracingOptions ¶
type TracingOptions struct { Zipkin string `long:"zipkin" validate:"omitempty,url" description:"Zipkin server base url, an URL like http://host:9411/"` Inputs struct { // The service name of your application ServiceName string `validate:"required"` } // contains filtered or unexported fields }
func (*TracingOptions) Initialize ¶
func (opts *TracingOptions) Initialize()
func (*TracingOptions) IsActive ¶
func (opts *TracingOptions) IsActive() bool
Click to show internal directories.
Click to hide internal directories.