Class SpanManager.Span

java.lang.Object
com.loomcache.server.tracing.SpanManager.Span
Enclosing class:
SpanManager

public static final class SpanManager.Span extends Object
Span record containing all span information.
Since:
1.0
  • Field Details

    • traceId

      public final String traceId
    • spanId

      public final String spanId
    • parentSpanId

      public final @Nullable String parentSpanId
    • operationName

      public final String operationName
    • kind

      public final SpanManager.SpanKind kind
    • startNanos

      public final long startNanos
  • Constructor Details

  • Method Details

    • setAttribute

      public void setAttribute(String key, Object value)
      Add an attribute to this span.
    • addEvent

      public void addEvent(String name)
      Add an event to this span.
    • addEvent

      public void addEvent(String name, Map<String,Object> eventAttributes)
      Add an event with attributes to this span.
    • getDurationNanos

      public long getDurationNanos()
      Get the duration of this span in nanoseconds.
    • getDurationMs

      public double getDurationMs()
      Get the duration of this span in milliseconds.
    • getAttributes

      public Map<String,Object> getAttributes()
      Get a copy of attributes.
    • getEvents

      public List<SpanManager.SpanEvent> getEvents()
      Get a copy of events.
    • isEnded

      public boolean isEnded()
      Check if span is ended.