micro/tracer/noop.go
Vasiliy Tolstov caec730248 move out tracers
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-09-10 00:06:29 +03:00

26 lines
394 B
Go

package tracer
import "context"
type noop struct{}
func (n *noop) Init(...Option) error {
return nil
}
func (n *noop) Start(ctx context.Context, name string) (context.Context, *Span) {
return nil, nil
}
func (n *noop) Finish(*Span) error {
return nil
}
func (n *noop) Read(...ReadOption) ([]*Span, error) {
return nil, nil
}
func newTracer(opts ...Option) Tracer {
return &noop{}
}