Skip to content

Commit 3dc2106

Browse files
authored
Merge pull request #22 from tcolgate/master
Add NewSpanEventListener as an option.
2 parents 96edd86 + d15b14c commit 3dc2106

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tracer.go

+8
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,14 @@ func EnableSpanPool(val bool) TracerOption {
173173
}
174174
}
175175

176+
// NewSpanEventListener option
177+
func NewSpanEventListener(f func() func(SpanEvent)) TracerOption {
178+
return func(opts *TracerOptions) error {
179+
opts.newSpanEventListener = f
180+
return nil
181+
}
182+
}
183+
176184
// NewTracer creates a new OpenTracing compatible Zipkin Tracer.
177185
func NewTracer(recorder SpanRecorder, options ...TracerOption) (opentracing.Tracer, error) {
178186
opts := &TracerOptions{

0 commit comments

Comments
 (0)