Packages

trait Telemetry extends AnyRef

Service Provider Interface (SPI) for collecting metrics from projections.

Implementations must include a single constructor with two arguments: ProjectionId and ActorSystem. To setup your implementation, add a setting on your application.conf:

akka.projection.telemetry.implementations += com.example.MyMetrics
Annotations
@InternalStableApi()
Source
Telemetry.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Telemetry
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def afterProcess(externalContext: AnyRef): Unit

    Invoked after processing an event such that it is visible by the read-side threads (data is committed).

    Invoked after processing an event such that it is visible by the read-side threads (data is committed). This method is granted to be invoked after the envelope handler has committed but may or may not happen after the offset was committed (depending on the projection semantics).

    externalContext

    the context produced by Telemetry.beforeProcess and attached to the processed envelope.

  2. abstract def beforeProcess[Envelope](envelope: Envelope, creationTimeInMillis: Long): AnyRef

    Invoked as soon as the envelope is read, deserialised and ready to be processed.

    Invoked as soon as the envelope is read, deserialised and ready to be processed.

    envelope

    the envelope that's ready for processing. The type Envelope will always represent a single item as stored in the event log.

    creationTimeInMillis

    Timestamp (in millis-since-epoch) of the instant when the envelope was created. The meaning of "when the envelope was created" is implementation specific and could be an instant on the producer machine, or the instant when the database persisted the envelope, or other.

    returns

    an externally-provided context that will propagate with the envelope until Telemetry.afterProcess

  3. abstract def error(cause: Throwable): Unit

    Invoked when processing an envelope errors.

    Invoked when processing an envelope errors. When using a akka.projection.HandlerRecoveryStrategy that retries, this method will be invoked as many times as retries. If the error propagates and causes the projection to fail Telemetry.failed will be invoked.

    cause

    exception thrown by the errored envelope handler.

  4. abstract def failed(cause: Throwable): Unit

    Invoked when a projection processing an envelope fails (even after all retry attempts).

    Invoked when a projection processing an envelope fails (even after all retry attempts). The projection may then be restarted by a supervisor.

    cause

    exception thrown by the errored envelope handler.

  5. abstract def onOffsetStored(numberOfEnvelopes: Int): Unit

    Invoked when the offset is committed.

    Invoked when the offset is committed.

    numberOfEnvelopes

    number of envelopes marked as committed when committing this offset. This takes into consideration both batched processing (only commit one offset every N envelopes) and grouped handling (user code processes multiple envelopes at once).

  6. abstract def stopped(): Unit

    Invoked when a projection is stopped.

    Invoked when a projection is stopped. The reason for stopping is unspecified, can be a graceful stop or a failure (see Telemetry.failed).

Concrete 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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped