Interface TraceUtil.Span

Enclosing interface:
TraceUtil

public static interface TraceUtil.Span
Represents a trace span.
  • Method Details

    • addEvent

      TraceUtil.Span addEvent(String name)
      Adds the given event to this span.
    • addEvent

      TraceUtil.Span addEvent(String name, Map<String,Object> attributes)
      Adds the given event with the given attributes to this span.
    • setAttribute

      TraceUtil.Span setAttribute(String key, int value)
      Adds the given attribute to this span.
    • setAttribute

      TraceUtil.Span setAttribute(String key, String value)
      Adds the given attribute to this span.
    • setAttribute

      TraceUtil.Span setAttribute(String key, boolean value)
      Adds the given attribute to this span.
    • getSpan

      io.opentelemetry.api.trace.Span getSpan()
    • makeCurrent

      TraceUtil.Scope makeCurrent()
      Marks this span as the current span.
    • end

      void end()
      Ends this span.
    • end

      void end(Throwable error)
      Ends this span in an error.
    • endAtFuture

      <T> void endAtFuture(com.google.api.core.ApiFuture<T> futureValue)
      If an operation ends in the future, its relevant span should end _after_ the future has been completed. This method "appends" the span completion code at the completion of the given future. In order for telemetry info to be recorded, the future returned by this method should be completed.