You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-06-27 00:21:15 +02:00
trace: Add Span.AddLink method (#5032)
This commit is contained in:
@ -629,7 +629,7 @@ func (s *recordingSpan) Resource() *resource.Resource {
|
||||
return s.tracer.provider.resource
|
||||
}
|
||||
|
||||
func (s *recordingSpan) addLink(link trace.Link) {
|
||||
func (s *recordingSpan) AddLink(link trace.Link) {
|
||||
if !s.IsRecording() || !link.SpanContext.IsValid() {
|
||||
return
|
||||
}
|
||||
@ -803,6 +803,9 @@ func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {}
|
||||
// AddEvent does nothing.
|
||||
func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {}
|
||||
|
||||
// AddLink does nothing.
|
||||
func (nonRecordingSpan) AddLink(trace.Link) {}
|
||||
|
||||
// SetName does nothing.
|
||||
func (nonRecordingSpan) SetName(string) {}
|
||||
|
||||
|
Reference in New Issue
Block a user