/// <summary> Ends the current span.</summary>
 public void Dispose()
 {
     if (Interlocked.CompareExchange(ref _ticks, DateTime.UtcNow.Ticks, 0) == 0)
     {
         TraceSpan.EndTime = Timestamp.FromDateTime(new DateTime(_ticks, DateTimeKind.Utc));
         _tracer.EndSpan(this);
     }
     else
     {
         GaxPreconditions.CheckState(false, "Span cannot be disposed twice.");
     }
 }
 /// <summary> Ends the current span.</summary>
 public void Dispose() => _tracer.EndSpan();