Exemple #1
0
        public override void End(EndSpanOptions options)
        {
            if (!this.Options.HasFlag(SpanOptions.RecordEvents))
            {
                return;
            }

            lock (this.@lock)
            {
                if (this.hasBeenEnded)
                {
                    // logger.log(Level.FINE, "Calling end() on an ended Span.");
                    return;
                }

                if (options.Status != null)
                {
                    this.status = options.Status;
                }

                this.sampleToLocalSpanStore = options.SampleToLocalSpanStore;
                this.endNanoTime            = this.clock.NowNanos;
                this.hasBeenEnded           = true;
            }

            this.startEndHandler.OnEnd(this);
        }
Exemple #2
0
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj is EndSpanOptions)
     {
         EndSpanOptions that = (EndSpanOptions)obj;
         return((this.SampleToLocalSpanStore == that.SampleToLocalSpanStore) &&
                ((this.Status == null) ? (that.Status == null) : this.Status.Equals(that.Status)));
     }
     return(false);
 }
Exemple #3
0
 public override void End(EndSpanOptions options)
 {
     if (!Options.HasFlag(SpanOptions.RECORD_EVENTS))
     {
         return;
     }
     lock (_lock)
     {
         if (hasBeenEnded)
         {
             //logger.log(Level.FINE, "Calling end() on an ended Span.");
             return;
         }
         if (options.Status != null)
         {
             status = options.Status;
         }
         sampleToLocalSpanStore = options.SampleToLocalSpanStore;
         endNanoTime            = clock.NowNanos;
         hasBeenEnded           = true;
     }
     startEndHandler.OnEnd(this);
 }
Exemple #4
0
 public override void End(EndSpanOptions options)
 {
 }
Exemple #5
0
 /// <inheritdoc/>
 public abstract void End(EndSpanOptions options);