Support cross-thread trace profiling#111
Conversation
profile.graphqls
Outdated
| # query profiled segment | ||
| getProfiledSegment(segmentId: String): ProfiledSegment | ||
| # query combined segments by ref | ||
| getProfiledSegments(segmentIds: [String!]!): [ProfiledSegments!]! |
There was a problem hiding this comment.
What do you mean by ref? It is better query by Trace ID?
There was a problem hiding this comment.
This means combining all the same segments under one process.
Query by segments because this query only focuses on the profiled segments, not all segments under one trace.
There was a problem hiding this comment.
Are you going to verify the segment data somehow?
There was a problem hiding this comment.
No verification, just query the segments and combine them when the cross-thread segment matches with the parent segment.
Then, The UI can show the spans in the same process, and analyze the profiling results with the same process(segment id list).
There was a problem hiding this comment.
And why do we need ProfiledSegments Array and this new object rather than only ProfiledSegment array only?
There was a problem hiding this comment.
No verification, just query the segments and combine them when the cross-thread segment matches with the parent segment. Then, The UI can show the spans in the same process, and analyze the profiling results with the same process(segment id list).
I think UI is hard to verify things like ref linking segments. We may only bind segments with trace ID belonging to one task ID. This should be enough.
There was a problem hiding this comment.
Because they may become different traces/processes, this decide by the query.
There was a problem hiding this comment.
No verification, just query the segments and combine them when the cross-thread segment matches with the parent segment. Then, The UI can show the spans in the same process, and analyze the profiling results with the same process(segment id list).
I think UI is hard to verify things like
reflinking segments. We may only bind segments with trace ID belonging to one task ID. This should be enough.
Do you mean to query all segments in the same trace? But there may have multiple segments that are not profiled, so they cannot be analyzed.
profile.graphqls
Outdated
| @@ -156,6 +163,10 @@ extend type Query { | |||
| getProfileTaskSegmentList(taskID: String): [BasicTrace!]! | |||
There was a problem hiding this comment.
@mrproliu How about UI enhancing this way,
- Use this API, to group
segmentIds bytraceIdandInstance ID(new Added). Could our backend these without agent update? getProfiledSegments(new APIs) to getProfiledSegments.- Build profiling.
The major differences with yours are
getProfiledSegmentshould bedeprecated, only a shell(special condition) togetProfiledSegments.- No new
ProfiledSegments.
Following apache/skywalking#10373
We need to let GraphQL support query/analysis with multiple segments.