public SegmentRequest Transform() { var upstreamSegment = new SegmentRequest { UniqueIds = _relatedGlobalTraces.GetRelatedGlobalTraces() .Select(x => x.ToUniqueId()).ToArray() }; upstreamSegment.Segment = new SegmentObjectRequest { SegmentId = TraceSegmentId.Transform(), Spans = _spans.Select(x => x.Transform()).ToArray(), ServiceId = ApplicationId, ServiceInstanceId = ApplicationInstanceId }; return(upstreamSegment); }
public UpstreamSegment Transform() { var upstreamSegment = new UpstreamSegment(); upstreamSegment.GlobalTraceIds.AddRange(_relatedGlobalTraces.GetRelatedGlobalTraces() .Select(x => x.ToUniqueId())); var traceSegment = new TraceSegmentObject { TraceSegmentId = TraceSegmentId.Transform() }; traceSegment.Spans.AddRange(_spans.Select(x => x.Transform())); traceSegment.ApplicationId = ApplicationId; traceSegment.ApplicationInstanceId = ApplicationInstanceId; traceSegment.IsSizeLimited = _isSizeLimited; upstreamSegment.Segment = traceSegment.ToByteString(); return(upstreamSegment); }