Packages

class CallTimer extends AnyRef

Object used to record and retrieve results for external system calls. There will be a timer that shows response times without external services, as well as record the time used for this service.

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

Instance Constructors

  1. new CallTimer(registries: MetricRegistries, configuration: Configuration)
    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. val externalHttpPrefix: String
  9. val externalNonHttpPrefix: String
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def measureExternalHttpCall[T](requestId: Option[Long], name: String = "external-service", httpMethod: String = "GET", responseCodeFunction: (T) ⇒ Int = data: T => Status.OK)(call: Future[T])(implicit executionContext: ExecutionContext): Future[T]

    Helper function that measures the time needed for a given future to complete, taking this as an external call.

    Helper function that measures the time needed for a given future to complete, taking this as an external call. Used only for HTTP calls returning a numeric response code. Failed futures will not record anything, you need to take care to recover yourself beforehand.

    T

    The type that the call returns

    requestId

    The request id of the call, if any

    name

    the name of the external service

    httpMethod

    the http method that the call uses

    responseCodeFunction

    a function that can map from the data of the result of the call to an http result code

    call

    the call that should be performed

    returns

    A Future that also measures the time needed to be completed

  15. def measureExternalNonHttpCall[T](requestId: Option[Long], name: String = "external-service", method: String = "READ", responseCodeFunction: (T) ⇒ String = data: T => "OK")(call: Future[T])(implicit executionContext: ExecutionContext): Future[T]

    Helper function that measures the time needed for a given future to complete, taking this as an external call.

    Helper function that measures the time needed for a given future to complete, taking this as an external call. Used only for non-HTTP calls. These calls may have any response code type. Failed futures will not record anything, you need to take care to recover yourself beforehand.

    T

    The type that the call returns

    requestId

    The request id of the call, if any

    name

    the name of the external service

    method

    the method that the call uses. Defaults to "READ", may be any string. Proposal: READ / WRITE / EXECUTE.

    responseCodeFunction

    a function that can map from the data of the result of the call to an http result code

    call

    the call that should be performed

    returns

    A Future that also measures the time needed to be completed

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def readExternalCallTimes(requestId: Long): Duration

    Reads aggregated external call times that have been recorded with above functions and a given request id.

  20. def recordExternalHttpCall(requestId: Option[Long], duration: Duration, name: String = "external-service", httpMethod: String = "GET", responseCode: Int = Status.OK): Unit

    Used to record an external http call that has been performed without using the Future that created it.

    Used to record an external http call that has been performed without using the Future that created it. May be useful if either your call is synchronous.

  21. def recordExternalNonHttpCall(requestId: Option[Long], duration: Duration, name: String = "external-service", method: String = "READ", responseCode: String = "OK"): Unit

    Used to record an external call that has been performed without using the Future that created it.

    Used to record an external call that has been performed without using the Future that created it. May be useful if either your call is synchronous.

  22. def recordFailedExternalHttpCall(requestId: Option[Long], duration: Duration, name: String, httpMethod: String): Unit
  23. val registry: MetricRegistry
  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped