Skip to content

Commit

Permalink
Merge pull request #161 from unistack-org/tracer
Browse files Browse the repository at this point in the history
tracer: add labels method
  • Loading branch information
vtolstov authored Dec 24, 2022
2 parents b48faa3 + a81649d commit 1687b98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tracer/noop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 2 additions & 0 deletions tracer/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
}

0 comments on commit 1687b98

Please sign in to comment.