package opentracing

import 

// A NoopTracer is a trivial, minimum overhead implementation of Tracer
// for which all operations are no-ops.
//
// The primary use of this implementation is in libraries, such as RPC
// frameworks, that make tracing an optional feature controlled by the
// end user. A no-op implementation allows said libraries to use it
// as the default Tracer and to write instrumentation that does
// not need to keep checking if the tracer instance is nil.
//
// For the same reason, the NoopTracer is the default "global" tracer
// (see GlobalTracer and SetGlobalTracer functions).
//
// WARNING: NoopTracer does not support baggage propagation.
type NoopTracer struct{}

type noopSpan struct{}
type noopSpanContext struct{}

var (
	defaultNoopSpanContext SpanContext = noopSpanContext{}
	defaultNoopSpan        Span        = noopSpan{}
	defaultNoopTracer      Tracer      = NoopTracer{}
)

const (
	emptyString = ""
)

// noopSpanContext:
func ( noopSpanContext) ( func(,  string) bool) {}

// noopSpan:
func ( noopSpan) () SpanContext                                  { return defaultNoopSpanContext }
func ( noopSpan) (,  string) Span                   { return  }
func ( noopSpan) ( string) string                         { return emptyString }
func ( noopSpan) ( string,  interface{}) Span             { return  }
func ( noopSpan) ( ...log.Field)                         {}
func ( noopSpan) ( ...interface{})                          {}
func ( noopSpan) ()                                               {}
func ( noopSpan) ( FinishOptions)                  {}
func ( noopSpan) ( string) Span            { return  }
func ( noopSpan) () Tracer                                        { return defaultNoopTracer }
func ( noopSpan) ( string)                                 {}
func ( noopSpan) ( string,  interface{}) {}
func ( noopSpan) ( LogData)                                      {}

// StartSpan belongs to the Tracer interface.
func ( NoopTracer) ( string,  ...StartSpanOption) Span {
	return defaultNoopSpan
}

// Inject belongs to the Tracer interface.
func ( NoopTracer) ( SpanContext,  interface{},  interface{}) error {
	return nil
}

// Extract belongs to the Tracer interface.
func ( NoopTracer) ( interface{},  interface{}) (SpanContext, error) {
	return nil, ErrSpanContextNotFound
}