- 最新
- 投票最多
- 评论最多
Hi Chris!
Thanks for posting this issue. X-Ray the service will aggregate the data that clients (instrumented with the X-Ray SDK or OpenTelemetry) send it. X-Ray does support showing "in-progress" segments, but only if the clients actually send the traces/segments before they are closed out.
You are most likely wrapping a segment around your process so that once the process finishes you are using endSegment()
to close out the segment. This segment closing "flushes" the segment to the X-Ray service and that's why you would see it there.
However, if you want to see it in progress, you need to periodically call sendSegment()
so that the X-Ray service can display it. Only after you call that method can you retrieve the data X-Ray receives.
You want to do this on the Root segment, as subsegments cannot be sent without a segment to be their parent.
Hope this helps!