// WithTracer sets a custom tracer to be used for this middleware, otherwise the opentracing.GlobalTracer is used.
517162
func WithTracer(tracer opentracing.Tracer) Option {
	return func(o *options) {
		o.tracer = tracer
	}
}
1169228
func WithHTTPPropagation(p propagation.HTTPFormat) TracerOption {
	return func(o *TracerOptions) {
		if p == nil {
			// reset to default OC HTTP format
			o.HTTPPropagate = defaultHTTPPropagate
			return
		}
		o.HTTPPropagate = p
	}
}
297001
func ExposeStackTrace(err error) error {
	if err == nil {
		return err
	}

	st, ok := getStackTracer(err)
	if !ok {
		return err
	}

	return &withStack{
		err: err,
		st:  st,
	}
}
344134
func (s *Server) Trace(path string, h HandlerFunc, opts ...HandlerOption) {
	s.register(http.MethodTrace, path, h, opts...)
}
113512
func NewWithOptions(opts Options) opentracing.Tracer {
	rval := &tracerImpl{options: opts}
	rval.textPropagator = &textMapPropagator{rval}
	rval.binaryPropagator = &binaryPropagator{rval}
	rval.accessorPropagator = &accessorPropagator{rval}
	return rval
}
625853
func (s *Stage) SetTracingEnabled(v bool) *Stage {
	s.TracingEnabled = &v
	return s
}
1143398
func (i *Inbound) Tracer(tracer opentracing.Tracer) *Inbound {
	i.tracer = tracer
	return i
}
604929
func (s *Session) SetTrace(trace Tracer) {
	s.mu.Lock()
	s.trace = trace
	s.mu.Unlock()
}
1106773
func (o *PatchSkusIdentifierParams) WithIdentifier(identifier string) *PatchSkusIdentifierParams {
	o.Identifier = identifier
	return o
}
1208676
func WithTraceID128Bit(val bool) TracerOption {
	return func(o *Tracer) error {
		if val {
			o.generate = idgenerator.NewRandom128()
		} else {
			o.generate = idgenerator.NewRandom64()
		}
		return nil
	}
}
729562
func WithSampler(sampler trace.Sampler) TracerOption {
	return func(o *TracerOptions) {
		o.Sampler = sampler
	}
}
244660
func withLogger(logger log.Logger) func(c *zk.Conn) {
	return func(c *zk.Conn) {
		c.SetLogger(wrapLogger{logger})
	}
}
567944
func Tracer(tracer trace.Tracer) SchemaOpt {
	return func(s *Schema) {
		s.tracer = tracer
	}
}
783309
func WithTracing(ctx context.Context, tracing *Tracing) context.Context {
	return context.WithValue(ctx, tracingKey, tracing)
}
559844
func (o *PatchPollersIdentifierParams) WithIdentifier(identifier string) *PatchPollersIdentifierParams {
	o.Identifier = identifier
	return o
}
1059302
func (o *GetPolicyResolveParams) WithTraceSelector(traceSelector *models.TraceSelector) *GetPolicyResolveParams {
	o.SetTraceSelector(traceSelector)
	return o
}
1009452
func (s *SearchContext) WithLogger(log io.Writer) *SearchContext {
	result := *s
	result.Logging = logging.NewLogBackend(log, "", 0)
	if result.Trace == TRACE_DISABLED {
		result.Trace = TRACE_ENABLED
	}
	return &result
}