Class FailureStoreMetrics

java.lang.Object
org.elasticsearch.action.bulk.FailureStoreMetrics

public class FailureStoreMetrics extends Object
A class containing APM metrics for failure stores. See the JavaDoc on the individual methods for an explanation on what they're tracking. General notes:
  • When a document is rerouted in a pipeline, the destination data stream is used for the metric attribute(s).
  • Field Details

  • Constructor Details

    • FailureStoreMetrics

      public FailureStoreMetrics(MeterRegistry meterRegistry)
  • Method Details

    • incrementTotal

      public void incrementTotal(String dataStream)
      This counter tracks the number of documents that we tried to index into a data stream. This includes documents that were dropped by a pipeline. This counter will only be incremented once for every incoming document (even when it gets redirected to the failure store and/or gets rejected).
      Parameters:
      dataStream - the name of the data stream
    • incrementFailureStore

      public void incrementFailureStore(String dataStream, String errorType, FailureStoreMetrics.ErrorLocation errorLocation)
      This counter tracks the number of documents that we tried to store into a failure store. This includes both pipeline and shard-level failures.
      Parameters:
      dataStream - the name of the data stream
      errorType - the error type (i.e. the name of the exception that was thrown)
      errorLocation - where this failure occurred
    • incrementRejected

      public void incrementRejected(String dataStream, String errorType, FailureStoreMetrics.ErrorLocation errorLocation, boolean failureStore)
      This counter tracks the number of documents that failed to get stored in Elasticsearch. Meaning, any document that did not get stored in the data stream or in its failure store.
      Parameters:
      dataStream - the name of the data stream
      errorType - the error type (i.e. the name of the exception that was thrown)
      errorLocation - where this failure occurred
      failureStore - whether this failure occurred while trying to ingest into a failure store (true) or in the data stream itself (false)