26 lines
394 B
Go
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{}
|
||
|
}
|