tracer: improve
This commit is contained in:
@@ -93,14 +93,6 @@ type EventOptions struct {
|
||||
Labels []interface{}
|
||||
}
|
||||
|
||||
func WithEventLabels(labels ...interface{}) options.Option {
|
||||
return options.Labels(labels...)
|
||||
}
|
||||
|
||||
func WithSpanLabels(labels ...interface{}) options.Option {
|
||||
return options.Labels(labels...)
|
||||
}
|
||||
|
||||
func WithSpanKind(k SpanKind) options.Option {
|
||||
return func(src interface{}) error {
|
||||
return options.Set(src, k, ".Kind")
|
||||
@@ -128,6 +120,15 @@ func NewSpanOptions(opts ...options.Option) SpanOptions {
|
||||
return options
|
||||
}
|
||||
|
||||
// NewEventOptions returns default EventOptions
|
||||
func NewEventOptions(opts ...options.Option) EventOptions {
|
||||
options := EventOptions{}
|
||||
for _, o := range opts {
|
||||
o(&options)
|
||||
}
|
||||
return options
|
||||
}
|
||||
|
||||
// NewOptions returns default options
|
||||
func NewOptions(opts ...options.Option) Options {
|
||||
options := Options{
|
||||
|
Reference in New Issue
Block a user