tracer: fix span options
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -3,7 +3,9 @@ package tracer
|
||||
import "go.unistack.org/micro/v3/logger"
|
||||
|
||||
// SpanOptions contains span option
|
||||
type SpanOptions struct{}
|
||||
type SpanOptions struct {
|
||||
Labels []interface{}
|
||||
}
|
||||
|
||||
// SpanOption func signature
|
||||
type SpanOption func(o *SpanOptions)
|
||||
@@ -14,6 +16,12 @@ type EventOptions struct{}
|
||||
// EventOption func signature
|
||||
type EventOption func(o *EventOptions)
|
||||
|
||||
func SpanLabels(labels ...interface{}) SpanOption {
|
||||
return func(o *SpanOptions) {
|
||||
o.Labels = labels
|
||||
}
|
||||
}
|
||||
|
||||
// Options struct
|
||||
type Options struct {
|
||||
// Logger used for logging
|
||||
|
||||
Reference in New Issue
Block a user