1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

Skip links with invalid span context (#2275)

* Skip links with invalid span context

* Add CHANGELOG entry

* Review suggestions
This commit is contained in:
Srikanth Chekuri
2021-10-12 20:15:10 +05:30
committed by GitHub
parent c71afaf31f
commit 8ba6da8f3e
4 changed files with 15 additions and 2 deletions

View File

@@ -453,7 +453,7 @@ func (s *recordingSpan) Resource() *resource.Resource {
}
func (s *recordingSpan) addLink(link trace.Link) {
if !s.IsRecording() {
if !s.IsRecording() || !link.SpanContext.IsValid() {
return
}
s.mu.Lock()