Skip to content

Commit

Permalink
add javadoc for new otel metrics and updated desc
Browse files Browse the repository at this point in the history
  • Loading branch information
m-nagarajan committed Feb 8, 2025
1 parent e525805 commit 6b17988
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,20 @@
* List all Metric entities for router
*/
public enum RouterMetricEntity {
/**
* Count of all incoming requests in the request handling path
*/
INCOMING_CALL_COUNT(
MetricType.COUNTER, MetricUnit.NUMBER, "Count of all incoming requests",
MetricType.COUNTER, MetricUnit.NUMBER, "Count of all incoming requests in the request handling path",
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
),
/**
* Count of all requests in the response handling path along with response codes.
* This vs {@link #INCOMING_CALL_COUNT} will help to correlate the incoming vs properly handled requests.
*/
CALL_COUNT(
MetricType.COUNTER, MetricUnit.NUMBER, "Count of all requests with response details",
MetricType.COUNTER, MetricUnit.NUMBER,
"Count of all requests in the response handling path along with response codes",
setOf(
VENICE_STORE_NAME,
VENICE_CLUSTER_NAME,
Expand All @@ -36,6 +44,9 @@ public enum RouterMetricEntity {
HTTP_RESPONSE_STATUS_CODE_CATEGORY,
VENICE_RESPONSE_STATUS_CODE_CATEGORY)
),
/**
* Latency based on all responses
*/
CALL_TIME(
MetricType.HISTOGRAM, MetricUnit.MILLISECOND, "Latency based on all responses",
setOf(
Expand All @@ -46,12 +57,19 @@ public enum RouterMetricEntity {
HTTP_RESPONSE_STATUS_CODE_CATEGORY,
VENICE_RESPONSE_STATUS_CODE_CATEGORY)
),
/**
* Count of keys in incoming requests in the request handling path
*/
INCOMING_KEY_COUNT(
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS, MetricUnit.NUMBER, "Count of keys in all requests",
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS, MetricUnit.NUMBER,
"Count of keys in incoming requests in the request handling path",
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD, VENICE_REQUEST_VALIDATION_OUTCOME)
),
/**
* Count of keys in the response handling path along with response codes.
*/
KEY_COUNT(
MetricType.HISTOGRAM, MetricUnit.NUMBER, "Count of keys in all responses",
MetricType.HISTOGRAM, MetricUnit.NUMBER, "Count of keys in the response handling path along with response codes",
setOf(
VENICE_STORE_NAME,
VENICE_CLUSTER_NAME,
Expand All @@ -60,25 +78,40 @@ public enum RouterMetricEntity {
HTTP_RESPONSE_STATUS_CODE_CATEGORY,
VENICE_RESPONSE_STATUS_CODE_CATEGORY)
),
/**
* Count of retries triggered
*/
RETRY_COUNT(
MetricType.COUNTER, MetricUnit.NUMBER, "Count of retries triggered",
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD, VENICE_REQUEST_RETRY_TYPE)
),
/**
* Count of allowed retry requests
*/
ALLOWED_RETRY_COUNT(
MetricType.COUNTER, MetricUnit.NUMBER, "Count of allowed retry requests",
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
),
/**
* Count of disallowed retry requests
*/
DISALLOWED_RETRY_COUNT(
MetricType.COUNTER, MetricUnit.NUMBER, "Count of disallowed retry requests",
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
),
RETRY_DELAY(
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS, MetricUnit.MILLISECOND, "Retry delay time",
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
),
/**
* Count of aborted retry requests
*/
ABORTED_RETRY_COUNT(
MetricType.COUNTER, MetricUnit.NUMBER, "Count of aborted retry requests",
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD, VENICE_REQUEST_RETRY_ABORT_REASON)
),
/**
* Retry delay time: Time in milliseconds between the original request and the retry request
*/
RETRY_DELAY(
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS, MetricUnit.MILLISECOND, "Retry delay time",
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
);

private final MetricEntity metricEntity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void testRouterMetricEntities() {
"incoming_call_count",
MetricType.COUNTER,
MetricUnit.NUMBER,
"Count of all incoming requests",
"Count of all incoming requests in the request handling path",
Utils.setOf(
VeniceMetricsDimensions.VENICE_STORE_NAME,
VeniceMetricsDimensions.VENICE_CLUSTER_NAME,
Expand All @@ -39,7 +39,7 @@ public void testRouterMetricEntities() {
"call_count",
MetricType.COUNTER,
MetricUnit.NUMBER,
"Count of all requests with response details",
"Count of all requests in the response handling path along with response codes",
Utils.setOf(
VeniceMetricsDimensions.VENICE_STORE_NAME,
VeniceMetricsDimensions.VENICE_CLUSTER_NAME,
Expand Down Expand Up @@ -67,7 +67,7 @@ public void testRouterMetricEntities() {
"incoming_key_count",
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS,
MetricUnit.NUMBER,
"Count of keys in all requests",
"Count of keys in incoming requests in the request handling path",
Utils.setOf(
VeniceMetricsDimensions.VENICE_STORE_NAME,
VeniceMetricsDimensions.VENICE_CLUSTER_NAME,
Expand All @@ -79,7 +79,7 @@ public void testRouterMetricEntities() {
"key_count",
MetricType.HISTOGRAM,
MetricUnit.NUMBER,
"Count of keys in all responses",
"Count of keys in the response handling path along with response codes",
Utils.setOf(
VeniceMetricsDimensions.VENICE_STORE_NAME,
VeniceMetricsDimensions.VENICE_CLUSTER_NAME,
Expand Down

0 comments on commit 6b17988

Please sign in to comment.