Skip to content

Commit

Permalink
added method ID() into span implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Nov 6, 2024
1 parent bd827d6 commit 2781035
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions span.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ type (
nopSpan struct{}
)

func (nopSpan) ID() (_ string, valid bool) {
return "", false
}

func (s *span) ID() (_ string, valid bool) {
return s.span.SpanContext().SpanID().String(), true
}

func (nopSpan) TraceID() (_ string, valid bool) {
return "", false
}
Expand Down

0 comments on commit 2781035

Please # to comment.