Ejemplo n.º 1
0
            public override IEnumerable <KeyValuePair <string, string?> >?ExtractBaggage(object?carrier, PropagatorGetterCallback?getter)
            {
                if (getter is null)
                {
                    return(null);
                }

                getter(carrier, XBaggage, out string?theBaggage, out _);

                return(PropagatorTests.ParseBaggage(theBaggage));
            }
Ejemplo n.º 2
0
            public override void Inject(Activity?activity, object?carrier, PropagatorSetterCallback?setter)
            {
                if (activity is null || carrier is null)
                {
                    return;
                }

                setter(carrier, XTraceParent, "x-" + activity.Id);

                if (!string.IsNullOrEmpty(activity.TraceStateString))
                {
                    setter(carrier, XTraceState, "x-" + activity.TraceStateString);
                }

                if (activity.Baggage.Count() > 0)
                {
                    setter(carrier, XBaggage, "x=y, " + PropagatorTests.GetFormattedBaggage(activity.Baggage));
                }
            }