-
Notifications
You must be signed in to change notification settings - Fork 53
/
tracer_0_14.go
45 lines (37 loc) · 1005 Bytes
/
tracer_0_14.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package lightstep
import (
"context"
"github.com/opentracing/opentracing-go"
)
// Tracerv0_14 matches the Tracer interface from v0.14.0
// DEPRECATED
type Tracerv0_14 interface {
opentracing.Tracer
// DEPRECATED: error is always nil. Equivalent to Tracer.Close(context.Background())
Close() error
// DEPRECATED: error is always nil. Equivalent to Tracer.Flush(context.Background())
Flush() error
// Options gets the Options used in New().
Options() Options
// Disable prevents the tracer from recording spans or flushing.
Disable()
}
type tracerv0_14 struct {
Tracer
}
// NewTracerv0_14 returns a tracer which conforms to the Tracer interface from v0.14.0,
// for backwards compatibility.
// DEPRECATED
func NewTracerv0_14(opts Options) Tracerv0_14 {
return &tracerv0_14{
Tracer: NewTracer(opts),
}
}
func (t *tracerv0_14) Close() error {
t.Tracer.Close(context.Background())
return nil
}
func (t *tracerv0_14) Flush() error {
t.Tracer.Flush(context.Background())
return nil
}