java.lang.Object
org.elasticsearch.action.bulk.FailureStoreMetrics
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).
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final FailureStoreMetrics
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
incrementFailureStore
(String dataStream, String errorType, FailureStoreMetrics.ErrorLocation errorLocation) This counter tracks the number of documents that we tried to store into a failure store.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.void
incrementTotal
(String dataStream) This counter tracks the number of documents that we tried to index into a data stream.
-
Field Details
-
NOOP
-
METRIC_TOTAL
- See Also:
-
METRIC_FAILURE_STORE
- See Also:
-
METRIC_REJECTED
- See Also:
-
-
Constructor Details
-
FailureStoreMetrics
-
-
Method Details
-
incrementTotal
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 streamerrorType
- 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 streamerrorType
- the error type (i.e. the name of the exception that was thrown)errorLocation
- where this failure occurredfailureStore
- whether this failure occurred while trying to ingest into a failure store (true
) or in the data stream itself (false
)
-