You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Catalogue of AWS-SDK metric definitions that this instrumentation recognizes.
10
-
* <p>
11
-
* Each enum constant knows:
12
-
* (1) the SDK metric identifier
13
-
* (2) the scope in the request/attempt/http hierarchy
14
-
* (3) how to build the {@link MetricStrategy} that records the metric.
15
-
* <p>
16
-
* This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
15
+
*
16
+
* <p>Each enum constant knows: (1) the SDK metric identifier (2) the scope in the
17
+
* request/attempt/http hierarchy (3) how to build the {@link MetricStrategy} that records the
18
+
* metric.
19
+
*
20
+
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
21
+
* at any time.
17
22
*/
18
23
publicenumMetricSpec {
19
24
// per-request metrics
20
25
API_CALL_DURATION(
21
26
CoreMetric.API_CALL_DURATION.name(),
22
27
Scope.REQUEST,
23
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "api_call_duration", "The total time taken to finish a request (inclusive of all retries)")
24
-
),
28
+
(meter, metricPrefix) ->
29
+
newDurationStrategy(
30
+
meter,
31
+
metricPrefix + "api_call_duration",
32
+
"The total time taken to finish a request (inclusive of all retries)")),
25
33
CREDENTIALS_FETCH_DURATION(
26
34
CoreMetric.CREDENTIALS_FETCH_DURATION.name(),
27
35
Scope.REQUEST,
28
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "credentials_fetch_duration", "Time taken to fetch AWS signing credentials for the request")
29
-
),
36
+
(meter, metricPrefix) ->
37
+
newDurationStrategy(
38
+
meter,
39
+
metricPrefix + "credentials_fetch_duration",
40
+
"Time taken to fetch AWS signing credentials for the request")),
30
41
ENDPOINT_RESOLVE_DURATION(
31
42
CoreMetric.ENDPOINT_RESOLVE_DURATION.name(),
32
43
Scope.REQUEST,
33
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "endpoint_resolve_duration", "Time it took to resolve the endpoint used for the API call")
34
-
),
44
+
(meter, metricPrefix) ->
45
+
newDurationStrategy(
46
+
meter,
47
+
metricPrefix + "endpoint_resolve_duration",
48
+
"Time it took to resolve the endpoint used for the API call")),
35
49
MARSHALLING_DURATION(
36
50
CoreMetric.MARSHALLING_DURATION.name(),
37
51
Scope.REQUEST,
38
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "marshalling_duration", "Time it takes to marshall an SDK request to an HTTP request")
39
-
),
52
+
(meter, metricPrefix) ->
53
+
newDurationStrategy(
54
+
meter,
55
+
metricPrefix + "marshalling_duration",
56
+
"Time it takes to marshall an SDK request to an HTTP request")),
40
57
TOKEN_FETCH_DURATION(
41
58
CoreMetric.TOKEN_FETCH_DURATION.name(),
42
59
Scope.REQUEST,
43
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "token_fetch_duration", "Time taken to fetch token signing credentials for the request")
44
-
),
60
+
(meter, metricPrefix) ->
61
+
newDurationStrategy(
62
+
meter,
63
+
metricPrefix + "token_fetch_duration",
64
+
"Time taken to fetch token signing credentials for the request")),
45
65
46
66
// per-attempt metrics
47
67
BACKOFF_DELAY_DURATION(
48
68
CoreMetric.BACKOFF_DELAY_DURATION.name(),
49
69
Scope.ATTEMPT,
50
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "backoff_delay_duration", "Duration of time the SDK waited before this API call attempt")
51
-
),
70
+
(meter, metricPrefix) ->
71
+
newDurationStrategy(
72
+
meter,
73
+
metricPrefix + "backoff_delay_duration",
74
+
"Duration of time the SDK waited before this API call attempt")),
52
75
READ_THROUGHPUT(
53
76
CoreMetric.READ_THROUGHPUT.name(),
54
77
Scope.ATTEMPT,
55
-
(meter, metricPrefix) -> newDoubleHistogramStrategy(meter, metricPrefix + "read_throughput", "Read throughput of the client in bytes/second")
56
-
),
78
+
(meter, metricPrefix) ->
79
+
newDoubleHistogramStrategy(
80
+
meter,
81
+
metricPrefix + "read_throughput",
82
+
"Read throughput of the client in bytes/second")),
57
83
SERVICE_CALL_DURATION(
58
84
CoreMetric.SERVICE_CALL_DURATION.name(),
59
85
Scope.ATTEMPT,
60
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "service_call_duration", "Time to connect, send the request and receive the HTTP status code and header")
61
-
),
86
+
(meter, metricPrefix) ->
87
+
newDurationStrategy(
88
+
meter,
89
+
metricPrefix + "service_call_duration",
90
+
"Time to connect, send the request and receive the HTTP status code and header")),
62
91
SIGNING_DURATION(
63
92
CoreMetric.SIGNING_DURATION.name(),
64
93
Scope.ATTEMPT,
65
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "signing_duration", "Time it takes to sign the HTTP request")
66
-
),
94
+
(meter, metricPrefix) ->
95
+
newDurationStrategy(
96
+
meter, metricPrefix + "signing_duration", "Time it takes to sign the HTTP request")),
67
97
TIME_TO_FIRST_BYTE(
68
98
CoreMetric.TIME_TO_FIRST_BYTE.name(),
69
99
Scope.ATTEMPT,
70
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "time_to_first_byte", "Elapsed time from sending the HTTP request to receiving the first byte of the headers")
71
-
),
100
+
(meter, metricPrefix) ->
101
+
newDurationStrategy(
102
+
meter,
103
+
metricPrefix + "time_to_first_byte",
104
+
"Elapsed time from sending the HTTP request to receiving the first byte of the headers")),
72
105
TIME_TO_LAST_BYTE(
73
106
CoreMetric.TIME_TO_LAST_BYTE.name(),
74
107
Scope.ATTEMPT,
75
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "time_to_last_byte", "Elapsed time from sending the HTTP request to receiving the last byte of the response")
76
-
),
108
+
(meter, metricPrefix) ->
109
+
newDurationStrategy(
110
+
meter,
111
+
metricPrefix + "time_to_last_byte",
112
+
"Elapsed time from sending the HTTP request to receiving the last byte of the response")),
77
113
UNMARSHALLING_DURATION(
78
114
CoreMetric.UNMARSHALLING_DURATION.name(),
79
115
Scope.ATTEMPT,
80
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "unmarshalling_duration", "Time it takes to unmarshall an HTTP response to an SDK response")
81
-
),
116
+
(meter, metricPrefix) ->
117
+
newDurationStrategy(
118
+
meter,
119
+
metricPrefix + "unmarshalling_duration",
120
+
"Time it takes to unmarshall an HTTP response to an SDK response")),
82
121
83
122
// HTTP metrics
84
123
AVAILABLE_CONCURRENCY(
85
124
HttpMetric.AVAILABLE_CONCURRENCY.name(),
86
125
Scope.HTTP,
87
-
(meter, metricPrefix) -> newLongHistogramStrategy(meter, metricPrefix + "available_concurrency", "Remaining concurrent requests that can be supported without a new connection")
88
-
),
126
+
(meter, metricPrefix) ->
127
+
newLongHistogramStrategy(
128
+
meter,
129
+
metricPrefix + "available_concurrency",
130
+
"Remaining concurrent requests that can be supported without a new connection")),
89
131
CONCURRENCY_ACQUIRE_DURATION(
90
132
HttpMetric.CONCURRENCY_ACQUIRE_DURATION.name(),
91
133
Scope.HTTP,
92
-
(meter, metricPrefix) -> newDurationStrategy(meter, metricPrefix + "concurrency_acquire_duration", "Time taken to acquire a channel from the connection pool")
93
-
),
134
+
(meter, metricPrefix) ->
135
+
newDurationStrategy(
136
+
meter,
137
+
metricPrefix + "concurrency_acquire_duration",
138
+
"Time taken to acquire a channel from the connection pool")),
94
139
LEASED_CONCURRENCY(
95
140
HttpMetric.LEASED_CONCURRENCY.name(),
96
141
Scope.HTTP,
97
-
(meter, metricPrefix) -> newLongHistogramStrategy(meter, metricPrefix + "leased_concurrency", "Number of requests currently being executed by the HTTP client")
98
-
),
142
+
(meter, metricPrefix) ->
143
+
newLongHistogramStrategy(
144
+
meter,
145
+
metricPrefix + "leased_concurrency",
146
+
"Number of requests currently being executed by the HTTP client")),
99
147
MAX_CONCURRENCY(
100
148
HttpMetric.MAX_CONCURRENCY.name(),
101
149
Scope.HTTP,
102
-
(meter, metricPrefix) -> newLongHistogramStrategy(meter, metricPrefix + "max_concurrency", "Maximum number of concurrent requests supported by the HTTP client")
103
-
),
150
+
(meter, metricPrefix) ->
151
+
newLongHistogramStrategy(
152
+
meter,
153
+
metricPrefix + "max_concurrency",
154
+
"Maximum number of concurrent requests supported by the HTTP client")),
104
155
PENDING_CONCURRENCY_ACQUIRES(
105
156
HttpMetric.PENDING_CONCURRENCY_ACQUIRES.name(),
106
157
Scope.HTTP,
107
-
(meter, metricPrefix) -> newLongHistogramStrategy(meter, metricPrefix + "pending_concurrency_acquires", "Number of requests waiting for a connection or stream to be available")
108
-
);
158
+
(meter, metricPrefix) ->
159
+
newLongHistogramStrategy(
160
+
meter,
161
+
metricPrefix + "pending_concurrency_acquires",
162
+
"Number of requests waiting for a connection or stream to be available"));
0 commit comments