Merge pull request #161 from unistack-org/tracer

tracer: add labels method
This commit is contained in:
Василий Толстов 2022-12-24 19:22:48 +03:00 committed by GitHub
commit 1687b98b11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,10 @@ func (s *noopSpan) SetLabels(labels ...interface{}) {
s.opts.Labels = labels
}
func (s *noopSpan) AddLabels(labels ...interface{}) {
s.opts.Labels = append(s.opts.Labels, labels...)
}
// NewTracer returns new memory tracer
func NewTracer(opts ...Option) Tracer {
return &noopTracer{

View File

@ -31,4 +31,6 @@ type Span interface {
SetName(name string)
// SetLabels set the span labels
SetLabels(labels ...interface{})
// AddLabels append the span labels
AddLabels(labels ...interface{})
}