Module org.elasticsearch.server
Package org.elasticsearch.repositories
Record Class RepositoriesMetrics
java.lang.Object
java.lang.Record
org.elasticsearch.repositories.RepositoriesMetrics
public record RepositoriesMetrics(MeterRegistry meterRegistry, LongCounter requestCounter, LongCounter exceptionCounter, LongCounter requestRangeNotSatisfiedExceptionCounter, LongCounter throttleCounter, LongCounter operationCounter, LongCounter unsuccessfulOperationCounter, LongHistogram exceptionHistogram, LongHistogram throttleHistogram, LongHistogram httpRequestTimeInMillisHistogram)
extends Record
The common set of metrics that we publish for
BlobStoreRepository implementations.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringEvery operation that is attempted will record a time.static final StringEach time an operation has one or more failed requests (from non2xxresponse or exception), the count of those is sampled Exposed viaexceptionHistogram()static final StringIs incremented each time an operation ends with a416response Exposed asrequestRangeNotSatisfiedExceptionCounter()static final StringIs incremented for each request which returns a non2xxresponse OR fails to return a response (includes throttling and retryable errors) Exposed asexceptionCounter()static final StringIs incremented for each operation we attempt, whether it succeeds or fails, this doesn't include retries Exposed viaoperationCounter()static final StringIs incremented for each request sent to the blob store (including retries) Exposed asrequestCounter()static final StringEach time an operation has one or more throttled requests, the count of those is sampled Exposed viathrottleHistogram()static final StringIs incremented each time we are throttled by the blob store, e.g.static final StringIs incremented for each operation that ends with a non2xxresponse or throws an exception Exposed viaunsuccessfulOperationCounter()static final RepositoriesMetrics -
Constructor Summary
ConstructorsConstructorDescriptionRepositoriesMetrics(MeterRegistry meterRegistry) RepositoriesMetrics(MeterRegistry meterRegistry, LongCounter requestCounter, LongCounter exceptionCounter, LongCounter requestRangeNotSatisfiedExceptionCounter, LongCounter throttleCounter, LongCounter operationCounter, LongCounter unsuccessfulOperationCounter, LongHistogram exceptionHistogram, LongHistogram throttleHistogram, LongHistogram httpRequestTimeInMillisHistogram) Creates an instance of aRepositoriesMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreateAttributesMap(RepositoryMetadata repositoryMetadata, OperationPurpose purpose, String operation) Create the map of attributes we expect to see on repository metricsfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexceptionCounterrecord component.Returns the value of theexceptionHistogramrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehttpRequestTimeInMillisHistogramrecord component.Returns the value of themeterRegistryrecord component.Returns the value of theoperationCounterrecord component.Returns the value of therequestCounterrecord component.Returns the value of therequestRangeNotSatisfiedExceptionCounterrecord component.Returns the value of thethrottleCounterrecord component.Returns the value of thethrottleHistogramrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunsuccessfulOperationCounterrecord component.
-
Field Details
-
NOOP
-
METRIC_REQUESTS_TOTAL
Is incremented for each request sent to the blob store (including retries) Exposed asrequestCounter()- See Also:
-
METRIC_EXCEPTIONS_TOTAL
Is incremented for each request which returns a non2xxresponse OR fails to return a response (includes throttling and retryable errors) Exposed asexceptionCounter()- See Also:
-
METRIC_EXCEPTIONS_REQUEST_RANGE_NOT_SATISFIED_TOTAL
Is incremented each time an operation ends with a416response Exposed asrequestRangeNotSatisfiedExceptionCounter()- See Also:
-
METRIC_THROTTLES_TOTAL
Is incremented each time we are throttled by the blob store, e.g. upon receiving an HTTP429response Exposed asthrottleCounter()- See Also:
-
METRIC_OPERATIONS_TOTAL
Is incremented for each operation we attempt, whether it succeeds or fails, this doesn't include retries Exposed viaoperationCounter()- See Also:
-
METRIC_UNSUCCESSFUL_OPERATIONS_TOTAL
Is incremented for each operation that ends with a non2xxresponse or throws an exception Exposed viaunsuccessfulOperationCounter()- See Also:
-
METRIC_EXCEPTIONS_HISTOGRAM
Each time an operation has one or more failed requests (from non2xxresponse or exception), the count of those is sampled Exposed viaexceptionHistogram()- See Also:
-
METRIC_THROTTLES_HISTOGRAM
Each time an operation has one or more throttled requests, the count of those is sampled Exposed viathrottleHistogram()- See Also:
-
HTTP_REQUEST_TIME_IN_MILLIS_HISTOGRAM
Every operation that is attempted will record a time. The value recorded here is the sum of the duration of each of the requests executed to try and complete the operation. The duration of each request is the time between sending the request and either a response being received, or the request failing. Does not include the consumption of the body of the response or any time spent pausing between retries. Exposed viahttpRequestTimeInMillisHistogram()- See Also:
-
-
Constructor Details
-
RepositoriesMetrics
-
RepositoriesMetrics
public RepositoriesMetrics(MeterRegistry meterRegistry, LongCounter requestCounter, LongCounter exceptionCounter, LongCounter requestRangeNotSatisfiedExceptionCounter, LongCounter throttleCounter, LongCounter operationCounter, LongCounter unsuccessfulOperationCounter, LongHistogram exceptionHistogram, LongHistogram throttleHistogram, LongHistogram httpRequestTimeInMillisHistogram) Creates an instance of aRepositoriesMetricsrecord class.- Parameters:
meterRegistry- the value for themeterRegistryrecord componentrequestCounter- the value for therequestCounterrecord componentexceptionCounter- the value for theexceptionCounterrecord componentrequestRangeNotSatisfiedExceptionCounter- the value for therequestRangeNotSatisfiedExceptionCounterrecord componentthrottleCounter- the value for thethrottleCounterrecord componentoperationCounter- the value for theoperationCounterrecord componentunsuccessfulOperationCounter- the value for theunsuccessfulOperationCounterrecord componentexceptionHistogram- the value for theexceptionHistogramrecord componentthrottleHistogram- the value for thethrottleHistogramrecord componenthttpRequestTimeInMillisHistogram- the value for thehttpRequestTimeInMillisHistogramrecord component
-
-
Method Details
-
createAttributesMap
public static Map<String,Object> createAttributesMap(RepositoryMetadata repositoryMetadata, OperationPurpose purpose, String operation) Create the map of attributes we expect to see on repository metrics -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
meterRegistry
Returns the value of themeterRegistryrecord component.- Returns:
- the value of the
meterRegistryrecord component
-
requestCounter
Returns the value of therequestCounterrecord component.- Returns:
- the value of the
requestCounterrecord component
-
exceptionCounter
Returns the value of theexceptionCounterrecord component.- Returns:
- the value of the
exceptionCounterrecord component
-
requestRangeNotSatisfiedExceptionCounter
Returns the value of therequestRangeNotSatisfiedExceptionCounterrecord component.- Returns:
- the value of the
requestRangeNotSatisfiedExceptionCounterrecord component
-
throttleCounter
Returns the value of thethrottleCounterrecord component.- Returns:
- the value of the
throttleCounterrecord component
-
operationCounter
Returns the value of theoperationCounterrecord component.- Returns:
- the value of the
operationCounterrecord component
-
unsuccessfulOperationCounter
Returns the value of theunsuccessfulOperationCounterrecord component.- Returns:
- the value of the
unsuccessfulOperationCounterrecord component
-
exceptionHistogram
Returns the value of theexceptionHistogramrecord component.- Returns:
- the value of the
exceptionHistogramrecord component
-
throttleHistogram
Returns the value of thethrottleHistogramrecord component.- Returns:
- the value of the
throttleHistogramrecord component
-
httpRequestTimeInMillisHistogram
Returns the value of thehttpRequestTimeInMillisHistogramrecord component.- Returns:
- the value of the
httpRequestTimeInMillisHistogramrecord component
-