public IContextCarrier Deserialize(string text)
        {
            string[] parts = text?.Split("|".ToCharArray(), 8);
            if (parts?.Length == 8)
            {
                _traceSegmentId = new ID(parts[0]);
                _spanId         = int.Parse(parts[1]);
                _parentApplicationInstanceId = int.Parse(parts[2]);
                _entryApplicationInstanceId  = int.Parse(parts[3]);
                _peerHost                  = parts[4];
                _entryOperationName        = parts[5];
                _parentOPerationName       = parts[6];
                _primaryDistributedTraceId = new PropagatedTraceId(parts[7]);
            }

            return(this);
        }
 public ContextSnapshot(ID traceSegmentId, int spanId, IEnumerable <DistributedTraceId> distributedTraceIds)
 {
     _traceSegmentId            = traceSegmentId;
     _spanId                    = spanId;
     _primaryDistributedTraceId = distributedTraceIds?.FirstOrDefault();
 }
Exemple #3
0
 public void RelatedGlobalTrace(DistributedTraceId distributedTraceId)
 {
     _relatedGlobalTraces.Append(distributedTraceId);
 }
 public void SetDistributedTraceIds(IEnumerable <DistributedTraceId> distributedTraceIds)
 {
     _primaryDistributedTraceId = distributedTraceIds.FirstOrDefault();
 }