You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the current implementation of ParentSpanID() only considers ChildOf relationship. So if a span has only FollowsFrom reference, the ParentSpanID() doesn't consider that and returns 0.
// ParentSpanID returns ID of a parent span if it exists.
// It searches for the first child-of reference pointing to the same trace ID.
func (s*Span) ParentSpanID() SpanID {
fori:=ranges.References {
ref:=&s.References[i]
ifref.TraceID==s.TraceID&&ref.RefType==ChildOf {
returnref.SpanID
}
}
returnSpanID(0)
}
Not sure any particular reason that FollowsFrom is not considered in the current implementation of ParentSpanID().
The proposal is to either 1) fix in collector metric to replace the ParentSpanID(), 2) fix in ParentSpanID().
Prefer 2) because we use this method a lot to determine a span is a root span internally, but changing its behavior might break other places in jaeger OSS.
Steps to reproduce
Create spans with FollowsFrom relationship, and check the collector trace metrics.
Expected behavior
non-root spans with FollowsFrom reference should not show as trace in collector metrics.
Relevant log output
No response
Screenshot
No response
Additional context
No response
Jaeger backend version
No response
SDK
No response
Pipeline
No response
Stogage backend
No response
Operating system
No response
Deployment model
No response
Deployment configs
No response
The text was updated successfully, but these errors were encountered:
## Which problem is this PR solving?
Resolves#4380
## Short description of the changes
handle FOLLOWS_FROM as a parent span ID
---------
Signed-off-by: Jakub Rydz <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
What happened?
We noticed that non-root spans with FollowsFrom reference are showing as traces in collector metrics, e.g.
traces.received
,traces.rejected
metrics.The reason is that in collector metrics,
ParentSpanID()
is used to determine if a span is a root span, e.g. belowjaeger/cmd/collector/app/metrics.go
Lines 233 to 237 in 3d67ac8
And the current implementation of
ParentSpanID()
only considers ChildOf relationship. So if a span has only FollowsFrom reference, theParentSpanID()
doesn't consider that and returns 0.jaeger/model/span.go
Lines 99 to 109 in 506adaf
Not sure any particular reason that FollowsFrom is not considered in the current implementation of
ParentSpanID()
.The proposal is to either 1) fix in collector metric to replace the
ParentSpanID()
, 2) fix inParentSpanID()
.Prefer 2) because we use this method a lot to determine a span is a root span internally, but changing its behavior might break other places in jaeger OSS.
Steps to reproduce
Create spans with FollowsFrom relationship, and check the collector trace metrics.
Expected behavior
non-root spans with FollowsFrom reference should not show as trace in collector metrics.
Relevant log output
No response
Screenshot
No response
Additional context
No response
Jaeger backend version
No response
SDK
No response
Pipeline
No response
Stogage backend
No response
Operating system
No response
Deployment model
No response
Deployment configs
No response
The text was updated successfully, but these errors were encountered: