com.beachape.zipkin

TracedOp

object TracedOp extends TracedOp

TraceOp companion object that sets a 50 millisecond timeout

Linear Supertypes
TracedOp, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TracedOp
  2. TracedOp
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply[A](traceName: String, annotations: (String, String)*)(f: (Option[Span]) ⇒ A)(implicit parentSpan: Span, zipkinService: ZipkinServiceLike): A

    Traces the provided synchronous operation Option[Span] => A op, using the provided traceName and annotations.

    Traces the provided synchronous operation Option[Span] => A op, using the provided traceName and annotations.

    This function expects that there is a parent Span in scope. If there is even is a Span in scope, it may not be used as a Parent Span if it does not have the proper ids, namely a span id and a trace id. In this case, a new scope with the given name and new ids will be used and it will not have a parent id.

    If the in scope ZipkinServiceLike does not provide a Span for the in scope parentSpan Span (or if it fails) your function will be handed a None. Also, note that if the ZipkinServiceLike does not provide a Span in the timeout duration timeout, then your function will be handed a None.

    Note, the Span given to your function should not be mutated to affect tracing. It is a deep copy anyways, so there will be no effect.

    TracedOp("sleepy", "boom" -> "shakalaka") { maybeSpan =>
    Thread.sleep(2000.millis.toMillis)
    3
    }
    traceName

    the name for the span used for tracing

    annotations

    variable list of annotations to send for tracing in the beginning (after the client sent annotation)

    f

    the function that will take a Option[Span] and produce an [A]

    Definition Classes
    TracedOp
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def endAnnotations[A](traceName: String, annotations: (String, String)*)(f: (Option[Span]) ⇒ (A, Seq[(String, String)]))(implicit parentSpan: Span, zipkinService: ZipkinServiceLike): A

    Traces the provided synchronous operation Option[Span] => A op, using the provided traceName and annotations.

    Traces the provided synchronous operation Option[Span] => A op, using the provided traceName and annotations. The Option[Span] parameter is so that you can pass the span details toother systems in your A-producing function. Note that this function expects the a Tuple2 result, where the second element in the pair is a Seq[(String, String)] set of annotations that you might want to use in order to set final annotations on the span.

    This function expects that there is a parent Span in scope. If there is even is a Span in scope, it may not be used as a Parent Span if it does not have the proper ids, namely a span id and a trace id. In this case, a new scope with the given name and new ids will be used and it will not have a parent id.

    If the in scope ZipkinServiceLike does not provide a Span for the in scope parentSpan Span (or if it fails) your function will be handed a None. Also, note that if the ZipkinServiceLike does not provide a Span in the timeout duration timeout, then your function will be handed a None.

    Note, the Span given to your function should not be mutated to affect tracing. It is a deep copy anyways, so there will be no effect.

    TracedOp.endAnnotations("sleepy", "boom" -> "shakalaka") { maybeSpan =>
    Thread.sleep(2000.millis.toMillis)
    (3, Seq("finished-with" -> "3")) // end annotations
    }
    traceName

    the name for the span used for tracing

    annotations

    variable list of annotations to send for tracing in the beginning (after the client sent annotation)

    f

    the function that will take a Option[Span] and produce an [A]

    Definition Classes
    TracedOp
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def simple[A](traceName: String, annotations: (String, String)*)(f: ⇒ A)(implicit parentSpan: Span, zipkinService: ZipkinServiceLike): A

    The simplest kind synchronous tracing; traces the provided operation f using the provided traceName and annotations.

    The simplest kind synchronous tracing; traces the provided operation f using the provided traceName and annotations.

    This function expects that there is a parent Span in scope. Even if there is a Span in scope, it may not be used as a Parent Span if it does not have the proper ids, namely a span id and a trace id. In this case, a new scope with the given name and new ids will be used and it will not have a parent id.

    If you do not need to have access to the generated Span used for tracing this operation, this is the best synchronous tracing method to use, as it does not block the current thread in waiting for the Span to be produced by the in-scope ZipkinServiceLike

    Example:

    TracedOp.simple("sleepy", "boom" -> "shakalaka") {
    Thread.sleep(2000.millis.toMillis)
    3
    }
    traceName

    the name for the span used for tracing

    annotations

    variable list of annotations to send for tracing in the beginning (after the client sent annotation)

    f

    the function that will take an [A]

    Definition Classes
    TracedOp
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. val timeout: FiniteDuration

    Duration of timeout to wait for the in-scope ZipkinServiceLike to produce a Span for sync tracing purposes

    Duration of timeout to wait for the in-scope ZipkinServiceLike to produce a Span for sync tracing purposes

    Definition Classes
    TracedOpTracedOp
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from TracedOp

Inherited from AnyRef

Inherited from Any

Ungrouped