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 String
Every operation that is attempted will record a time.static final String
Each time an operation has one or more failed requests (from non2xx
response or exception), the count of those is sampled Exposed viaexceptionHistogram()
static final String
Is incremented each time an operation ends with a416
response Exposed asrequestRangeNotSatisfiedExceptionCounter()
static final String
Is incremented for each request which returns a non2xx
response OR fails to return a response (includes throttling and retryable errors) Exposed asexceptionCounter()
static final String
Is incremented for each operation we attempt, whether it succeeds or fails, this doesn't include retries Exposed viaoperationCounter()
static final String
Is incremented for each request sent to the blob store (including retries) Exposed asrequestCounter()
static final String
Each time an operation has one or more throttled requests, the count of those is sampled Exposed viathrottleHistogram()
static final String
Is incremented each time we are throttled by the blob store, e.g.static final String
Is incremented for each operation that ends with a non2xx
response 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 aRepositoriesMetrics
record class. -
Method Summary
Modifier and TypeMethodDescriptioncreateAttributesMap
(RepositoryMetadata repositoryMetadata, OperationPurpose purpose, String operation) Create the map of attributes we expect to see on repository metricsfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexceptionCounter
record component.Returns the value of theexceptionHistogram
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thehttpRequestTimeInMillisHistogram
record component.Returns the value of themeterRegistry
record component.Returns the value of theoperationCounter
record component.Returns the value of therequestCounter
record component.Returns the value of therequestRangeNotSatisfiedExceptionCounter
record component.Returns the value of thethrottleCounter
record component.Returns the value of thethrottleHistogram
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theunsuccessfulOperationCounter
record 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 non2xx
response 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 a416
response Exposed asrequestRangeNotSatisfiedExceptionCounter()
- See Also:
-
METRIC_THROTTLES_TOTAL
Is incremented each time we are throttled by the blob store, e.g. upon receiving an HTTP429
response 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 non2xx
response or throws an exception Exposed viaunsuccessfulOperationCounter()
- See Also:
-
METRIC_EXCEPTIONS_HISTOGRAM
Each time an operation has one or more failed requests (from non2xx
response 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 aRepositoriesMetrics
record class.- Parameters:
meterRegistry
- the value for themeterRegistry
record componentrequestCounter
- the value for therequestCounter
record componentexceptionCounter
- the value for theexceptionCounter
record componentrequestRangeNotSatisfiedExceptionCounter
- the value for therequestRangeNotSatisfiedExceptionCounter
record componentthrottleCounter
- the value for thethrottleCounter
record componentoperationCounter
- the value for theoperationCounter
record componentunsuccessfulOperationCounter
- the value for theunsuccessfulOperationCounter
record componentexceptionHistogram
- the value for theexceptionHistogram
record componentthrottleHistogram
- the value for thethrottleHistogram
record componenthttpRequestTimeInMillisHistogram
- the value for thehttpRequestTimeInMillisHistogram
record 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 themeterRegistry
record component.- Returns:
- the value of the
meterRegistry
record component
-
requestCounter
Returns the value of therequestCounter
record component.- Returns:
- the value of the
requestCounter
record component
-
exceptionCounter
Returns the value of theexceptionCounter
record component.- Returns:
- the value of the
exceptionCounter
record component
-
requestRangeNotSatisfiedExceptionCounter
Returns the value of therequestRangeNotSatisfiedExceptionCounter
record component.- Returns:
- the value of the
requestRangeNotSatisfiedExceptionCounter
record component
-
throttleCounter
Returns the value of thethrottleCounter
record component.- Returns:
- the value of the
throttleCounter
record component
-
operationCounter
Returns the value of theoperationCounter
record component.- Returns:
- the value of the
operationCounter
record component
-
unsuccessfulOperationCounter
Returns the value of theunsuccessfulOperationCounter
record component.- Returns:
- the value of the
unsuccessfulOperationCounter
record component
-
exceptionHistogram
Returns the value of theexceptionHistogram
record component.- Returns:
- the value of the
exceptionHistogram
record component
-
throttleHistogram
Returns the value of thethrottleHistogram
record component.- Returns:
- the value of the
throttleHistogram
record component
-
httpRequestTimeInMillisHistogram
Returns the value of thehttpRequestTimeInMillisHistogram
record component.- Returns:
- the value of the
httpRequestTimeInMillisHistogram
record component
-