Exemplo n.º 1
0
 public override void AddAnnotation(string description, IDictionary <string, IAttributeValue> attributes)
 {
     if (!Options.HasFlag(SpanOptions.RECORD_EVENTS))
     {
         return;
     }
     lock (_lock)
     {
         if (hasBeenEnded)
         {
             //logger.log(Level.FINE, "Calling addAnnotation() on an ended Span.");
             return;
         }
         InitializedAnnotations.AddEvent(new EventWithNanoTime <IAnnotation>(clock.NowNanos, Annotation.FromDescriptionAndAttributes(description, attributes)));
     }
 }
Exemplo n.º 2
0
 public override void AddAnnotation(IAnnotation annotation)
 {
     if (!Options.HasFlag(SpanOptions.RECORD_EVENTS))
     {
         return;
     }
     lock (_lock)
     {
         if (hasBeenEnded)
         {
             //logger.log(Level.FINE, "Calling addAnnotation() on an ended Span.");
             return;
         }
         if (annotation == null)
         {
             throw new ArgumentNullException(nameof(annotation));
         }
         InitializedAnnotations.AddEvent(new EventWithNanoTime <IAnnotation>(clock.NowNanos, annotation));
     }
 }