/// <summary> /// Records a binary annotation within current span. /// Also sets it's endpoint if it was not set previously. /// </summary> public void Record(BinaryAnnotation binaryAnnotation) { if (binaryAnnotation.Endpoint == null) { binaryAnnotation = binaryAnnotation.WithEndpoint(Endpoint); } BinaryAnnotations.Add(binaryAnnotation); }
public static void AnnotateWith(this ITrace source, BinaryAnnotation binaryAnnotation) { if (source.Span == null) { return; } source.Span.BinaryAnnotations = source.Span.BinaryAnnotations ?? new List <BinaryAnnotation>(); if (binaryAnnotation.Host == null) { binaryAnnotation.Host = ZipkinConfig.ThisService; } source.Span.BinaryAnnotations.Add(binaryAnnotation); }
public static BinaryAnnotation ToThrift(this Zipkin.BinaryAnnotation annotation) { return(new BinaryAnnotation(annotation.Key, annotation.Value, annotation.AnnotationType, annotation.Endpoint.ToThrift())); }