Object/Class

com.ccadllc.cedi.dtrace

Evaluator

Related Docs: class Evaluator | package dtrace

Permalink

object Evaluator

This companion object for Evaluator instances provides smart constructors and a default value should no custom Evaluator be used when recording a span.

Source
Evaluator.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Evaluator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[A](exceptionToFailure: (Throwable) ⇒ Option[FailureDetail], resultToFailure: (A) ⇒ Option[FailureDetail]): Evaluator[A]

    Permalink

    Constructs an Evaluator instance with the two passed-in functions.

    Constructs an Evaluator instance with the two passed-in functions.

    exceptionToFailure

    - a function which takes a Throwable returned by the program whose execution is being traced by the span using this 'Evaluator' and possibly converts it to a FailureDetail which is used to determine that the span execution has succeeded or failed and how to render it. Generally, if the program itself has failed with a Throwable, you'll want to return a FailureDetail with a human-readable rendering of that error but there may be corner cases where the span itself should still be reported as having succeeded (if, for instance, an IO is failed with an exception meant to trigger some upstream program logic rather than indicate an error - not recommended, usually, but there may be reasons why this is necessary).

    resultToFailure

    - a function which takes the result of the program F[A] whose execution is being traced by the span using this Evaluator and possibly uses it to create a FailureDetail. Usually, if a program succeeds with a result, you won't want to generate a FailureDetail indicating that the span has failed; however, the program may be returning an application-specific data type which could indicate an error (such as an Either[Error, Result] or an enumerated ADT with values indicating failure). In those cases, this function can be used to translate the application-specific error to a FailureDetail.

    returns

    evaluator - a new instance of the Evaluator.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def default[A]: Evaluator[A]

    Permalink

    The default Evaluator instance, used if no custom Evaluator is passed to the TraceT.newSpan or TraceT.newAnnotatedSpan functions.

    The default Evaluator instance, used if no custom Evaluator is passed to the TraceT.newSpan or TraceT.newAnnotatedSpan functions. All program exceptions are converted to FailureDetail instances but otherwise no FailureDetails are generated.

    A

    - the result type of the effectful program being traced.

    returns

    newEvaluator - a new Evaluator instance, compatible with the result type of the effectful program being traced.

  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def exceptionToFailure[A](e2f: (Throwable) ⇒ Option[FailureDetail]): Evaluator[A]

    Permalink

    Constructs an Evaluator instance with the passed-in function used to convert a program failure Throwable to a possible FailureDetail.

    Constructs an Evaluator instance with the passed-in function used to convert a program failure Throwable to a possible FailureDetail. The default value is used for the function which converts a successful program result to a possible FailureDetail (the default function in this case always returns no FailureDetail for a successful program result).

    returns

    evaluator - a new instance of the Evaluator.

  11. def finalize(): Unit

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def resultToFailure[A](r2f: (A) ⇒ Option[FailureDetail]): Evaluator[A]

    Permalink

    Constructs an Evaluator instance with the passed-in function used to convert a program F[A]'s result A to a possible FailureDetail.

    Constructs an Evaluator instance with the passed-in function used to convert a program F[A]'s result A to a possible FailureDetail. The default value is used for the function which converts a program failure Throwable to a possible FailureDetail (the default function in this case always returns a FailureDetail using the Throwable to construct it).

    returns

    evaluator - a new instance of the Evaluator.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped