Class ElasticsearchObservationContext
java.lang.Object
io.micrometer.observation.Observation.Context
org.springframework.data.elasticsearch.client.elc.ElasticsearchObservationContext
- All Implemented Interfaces:
Observation.ContextView
Observation.Context for Spring Data Elasticsearch operations. One instance is created per observed operation.
It carries contextual data that conventions use to produce observation names and key-values.- Since:
- 6.1
- Author:
- maryantocinn
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchObservationContext(ElasticsearchOperationName operationName, @Nullable IndexCoordinates indexCoordinates) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetBatchSize(@Nullable Integer batchSize) Set the number of operations included in a batch (bulk) request.Methods inherited from class Observation.Context
addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Observation.ContextView
getOrDefault
-
Constructor Details
-
ElasticsearchObservationContext
public ElasticsearchObservationContext(ElasticsearchOperationName operationName, @Nullable IndexCoordinates indexCoordinates)
-
-
Method Details
-
getOperationName
- Returns:
- the Spring Data operation being performed.
-
getIndexCoordinates
- Returns:
- the target index coordinates, or null if the operation is not index-specific.
-
getIndexName
-
getBatchSize
-
setBatchSize
-