Class SpanWrapper

  • @Internal
    public class SpanWrapper
    extends java.lang.Object
    Wraps a RequestSpan, with the value-add that it automatically records how long the operation took for transaction logging.
    • Constructor Summary

      Constructor Description
      SpanWrapper​(com.couchbase.client.core.cnc.RequestTracer tracer, com.couchbase.client.core.cnc.RequestSpan span)  
    • Constructor Detail

      • SpanWrapper

        public SpanWrapper​(com.couchbase.client.core.cnc.RequestTracer tracer,
                           com.couchbase.client.core.cnc.RequestSpan span)
    • Method Detail

      • elapsed

        public long elapsed()
      • finish

        public long finish()
      • create

        public static SpanWrapper create​(com.couchbase.client.core.cnc.RequestTracer tracer,
                                         java.lang.String op,
                                         SpanWrapper parent)
      • attribute

        public <T> SpanWrapper attribute​(java.lang.String key,
                                         T value)
      • span

        public com.couchbase.client.core.cnc.RequestSpan span()
      • failWith

        public void failWith​(java.lang.Throwable err)