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))); } }
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)); } }