Class ElasticsearchObservationContext

java.lang.Object
io.micrometer.observation.Observation.Context
org.springframework.data.elasticsearch.client.elc.ElasticsearchObservationContext
All Implemented Interfaces:
Observation.ContextView

public class ElasticsearchObservationContext extends Observation.Context
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 Details

  • Method Details

    • getOperationName

      public ElasticsearchOperationName getOperationName()
      Returns:
      the Spring Data operation being performed.
    • getIndexCoordinates

      public @Nullable IndexCoordinates getIndexCoordinates()
      Returns:
      the target index coordinates, or null if the operation is not index-specific.
    • getIndexName

      public @Nullable String getIndexName()
      Returns:
      the comma-joined index name(s), or null if no index coordinates are set.
    • getBatchSize

      public @Nullable Integer getBatchSize()
      Returns:
      the batch size, or null if not a batch operation.
    • setBatchSize

      public void setBatchSize(@Nullable Integer batchSize)
      Set the number of operations included in a batch (bulk) request.
      Parameters:
      batchSize - the batch size, can be null