Skip to content

Commit 6b17988

Browse files
committed
add javadoc for new otel metrics and updated desc
1 parent e525805 commit 6b17988

File tree

2 files changed

+45
-12
lines changed

2 files changed

+45
-12
lines changed

Diff for: services/venice-router/src/main/java/com/linkedin/venice/router/stats/RouterMetricEntity.java

+41-8
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,20 @@
2222
* List all Metric entities for router
2323
*/
2424
public enum RouterMetricEntity {
25+
/**
26+
* Count of all incoming requests in the request handling path
27+
*/
2528
INCOMING_CALL_COUNT(
26-
MetricType.COUNTER, MetricUnit.NUMBER, "Count of all incoming requests",
29+
MetricType.COUNTER, MetricUnit.NUMBER, "Count of all incoming requests in the request handling path",
2730
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
2831
),
32+
/**
33+
* Count of all requests in the response handling path along with response codes.
34+
* This vs {@link #INCOMING_CALL_COUNT} will help to correlate the incoming vs properly handled requests.
35+
*/
2936
CALL_COUNT(
30-
MetricType.COUNTER, MetricUnit.NUMBER, "Count of all requests with response details",
37+
MetricType.COUNTER, MetricUnit.NUMBER,
38+
"Count of all requests in the response handling path along with response codes",
3139
setOf(
3240
VENICE_STORE_NAME,
3341
VENICE_CLUSTER_NAME,
@@ -36,6 +44,9 @@ public enum RouterMetricEntity {
3644
HTTP_RESPONSE_STATUS_CODE_CATEGORY,
3745
VENICE_RESPONSE_STATUS_CODE_CATEGORY)
3846
),
47+
/**
48+
* Latency based on all responses
49+
*/
3950
CALL_TIME(
4051
MetricType.HISTOGRAM, MetricUnit.MILLISECOND, "Latency based on all responses",
4152
setOf(
@@ -46,12 +57,19 @@ public enum RouterMetricEntity {
4657
HTTP_RESPONSE_STATUS_CODE_CATEGORY,
4758
VENICE_RESPONSE_STATUS_CODE_CATEGORY)
4859
),
60+
/**
61+
* Count of keys in incoming requests in the request handling path
62+
*/
4963
INCOMING_KEY_COUNT(
50-
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS, MetricUnit.NUMBER, "Count of keys in all requests",
64+
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS, MetricUnit.NUMBER,
65+
"Count of keys in incoming requests in the request handling path",
5166
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD, VENICE_REQUEST_VALIDATION_OUTCOME)
5267
),
68+
/**
69+
* Count of keys in the response handling path along with response codes.
70+
*/
5371
KEY_COUNT(
54-
MetricType.HISTOGRAM, MetricUnit.NUMBER, "Count of keys in all responses",
72+
MetricType.HISTOGRAM, MetricUnit.NUMBER, "Count of keys in the response handling path along with response codes",
5573
setOf(
5674
VENICE_STORE_NAME,
5775
VENICE_CLUSTER_NAME,
@@ -60,25 +78,40 @@ public enum RouterMetricEntity {
6078
HTTP_RESPONSE_STATUS_CODE_CATEGORY,
6179
VENICE_RESPONSE_STATUS_CODE_CATEGORY)
6280
),
81+
/**
82+
* Count of retries triggered
83+
*/
6384
RETRY_COUNT(
6485
MetricType.COUNTER, MetricUnit.NUMBER, "Count of retries triggered",
6586
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD, VENICE_REQUEST_RETRY_TYPE)
6687
),
88+
/**
89+
* Count of allowed retry requests
90+
*/
6791
ALLOWED_RETRY_COUNT(
6892
MetricType.COUNTER, MetricUnit.NUMBER, "Count of allowed retry requests",
6993
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
7094
),
95+
/**
96+
* Count of disallowed retry requests
97+
*/
7198
DISALLOWED_RETRY_COUNT(
7299
MetricType.COUNTER, MetricUnit.NUMBER, "Count of disallowed retry requests",
73100
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
74101
),
75-
RETRY_DELAY(
76-
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS, MetricUnit.MILLISECOND, "Retry delay time",
77-
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
78-
),
102+
/**
103+
* Count of aborted retry requests
104+
*/
79105
ABORTED_RETRY_COUNT(
80106
MetricType.COUNTER, MetricUnit.NUMBER, "Count of aborted retry requests",
81107
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD, VENICE_REQUEST_RETRY_ABORT_REASON)
108+
),
109+
/**
110+
* Retry delay time: Time in milliseconds between the original request and the retry request
111+
*/
112+
RETRY_DELAY(
113+
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS, MetricUnit.MILLISECOND, "Retry delay time",
114+
setOf(VENICE_STORE_NAME, VENICE_CLUSTER_NAME, VENICE_REQUEST_METHOD)
82115
);
83116

84117
private final MetricEntity metricEntity;

Diff for: services/venice-router/src/test/java/com/linkedin/venice/router/stats/RouterMetricEntityTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void testRouterMetricEntities() {
2828
"incoming_call_count",
2929
MetricType.COUNTER,
3030
MetricUnit.NUMBER,
31-
"Count of all incoming requests",
31+
"Count of all incoming requests in the request handling path",
3232
Utils.setOf(
3333
VeniceMetricsDimensions.VENICE_STORE_NAME,
3434
VeniceMetricsDimensions.VENICE_CLUSTER_NAME,
@@ -39,7 +39,7 @@ public void testRouterMetricEntities() {
3939
"call_count",
4040
MetricType.COUNTER,
4141
MetricUnit.NUMBER,
42-
"Count of all requests with response details",
42+
"Count of all requests in the response handling path along with response codes",
4343
Utils.setOf(
4444
VeniceMetricsDimensions.VENICE_STORE_NAME,
4545
VeniceMetricsDimensions.VENICE_CLUSTER_NAME,
@@ -67,7 +67,7 @@ public void testRouterMetricEntities() {
6767
"incoming_key_count",
6868
MetricType.MIN_MAX_COUNT_SUM_AGGREGATIONS,
6969
MetricUnit.NUMBER,
70-
"Count of keys in all requests",
70+
"Count of keys in incoming requests in the request handling path",
7171
Utils.setOf(
7272
VeniceMetricsDimensions.VENICE_STORE_NAME,
7373
VeniceMetricsDimensions.VENICE_CLUSTER_NAME,
@@ -79,7 +79,7 @@ public void testRouterMetricEntities() {
7979
"key_count",
8080
MetricType.HISTOGRAM,
8181
MetricUnit.NUMBER,
82-
"Count of keys in all responses",
82+
"Count of keys in the response handling path along with response codes",
8383
Utils.setOf(
8484
VeniceMetricsDimensions.VENICE_STORE_NAME,
8585
VeniceMetricsDimensions.VENICE_CLUSTER_NAME,

0 commit comments

Comments
 (0)