tracer: improve
Some checks failed
pr / test (pull_request) Failing after 2m43s
lint / lint (pull_request) Failing after 1m28s

This commit is contained in:
2023-09-08 13:58:11 +03:00
parent f890f1d8b4
commit 247c7f6fa2
7 changed files with 562 additions and 31 deletions

View File

@@ -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{