Skip to content

Commit

Permalink
Remove hasRemoteParent field from SDK span (#1728)
Browse files Browse the repository at this point in the history
Use the newly added SpanContext.IsRemote method instead.
  • Loading branch information
MrAlias authored Mar 25, 2021
1 parent 862a5a6 commit 382c7ce
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sdk/trace/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ type span struct {
// statusMessage represents the status of this span as a string.
statusMessage string

// hasRemoteParent is true when this span has a remote parent span.
hasRemoteParent bool

// childSpanCount holds the number of child spans created for this span.
childSpanCount int

Expand Down Expand Up @@ -447,7 +444,7 @@ func (s *span) Snapshot() *export.SpanSnapshot {

sd.ChildSpanCount = s.childSpanCount
sd.EndTime = s.endTime
sd.HasRemoteParent = s.hasRemoteParent
sd.HasRemoteParent = s.parent.IsRemote()
sd.InstrumentationLibrary = s.instrumentationLibrary
sd.Name = s.name
sd.ParentSpanID = s.parent.SpanID()
Expand Down Expand Up @@ -581,14 +578,12 @@ func startSpanInternal(ctx context.Context, tr *tracer, name string, o *trace.Sp

span.spanKind = trace.ValidateSpanKind(o.SpanKind)
span.name = name
span.hasRemoteParent = psc.IsRemote()
span.parent = psc
span.resource = provider.resource
span.instrumentationLibrary = tr.instrumentationLibrary

span.SetAttributes(samplingResult.Attributes...)

span.parent = psc

return span
}

Expand Down

0 comments on commit 382c7ce

Please sign in to comment.