tracer: improve tracing info
Some checks failed
lint / lint (pull_request) Failing after 1m29s
pr / test (pull_request) Failing after 2m37s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-09-01 08:41:23 +03:00
parent 8e72fb1c35
commit 18e7bb41ca
3 changed files with 73 additions and 47 deletions

View File

@@ -91,11 +91,19 @@ type SpanOptions struct {
type SpanOption func(o *SpanOptions)
// EventOptions contains event options
type EventOptions struct{}
type EventOptions struct {
Labels []interface{}
}
// EventOption func signature
type EventOption func(o *EventOptions)
func WithEventLabels(labels ...interface{}) EventOption {
return func(o *EventOptions) {
o.Labels = labels
}
}
func WithSpanLabels(labels ...interface{}) SpanOption {
return func(o *SpanOptions) {
o.Labels = labels