public ActivityContext(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags flags, ActivityTraceState traceState)
 {
     TraceId    = traceId;
     SpanId     = spanId;
     Flags      = flags;
     TraceState = traceState;
 }
 public ActivityContext(string traceParent, string traceState)
 {
     SpanId     = ActivitySpanId.CreateFromString(traceParent.AsSpan(36, 16));
     TraceId    = ActivityTraceId.CreateFromString(traceParent.AsSpan(3, 32));
     Flags      = (ActivityTraceFlags)HexByteFromChars(traceParent[53], traceParent[54]);
     TraceState = new ActivityTraceState(traceState);
 }