Class

org.zalando.markscheider

CallTimer

Related Doc: package markscheider

Permalink

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)

    Permalink
    Annotations
    @Inject()

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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  8. val externalHttpPrefix: String

    Permalink
  9. val externalNonHttpPrefix: String

    Permalink
  10. def finalize(): Unit

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

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

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

    Permalink
    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]

    Permalink

    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]

    Permalink

    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

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

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

    Permalink
    Definition Classes
    AnyRef
  19. def readExternalCallTimes(requestId: Long): Duration

    Permalink

    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

    Permalink

    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

    Permalink

    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. val registry: MetricRegistry

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped