-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Labels
coregood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
By adding the context concept, we can now include HTTP metrics in observe::MetricsLayer. In general, we have full access to HttpFetch, allowing us to wrap our own logic around it. Based on this, we can add metrics for HTTP request duration in seconds and track the number of bytes sent.
My current plan is to add the following metrics:
http_request_duration_seconds: Histogram of time spent during http requestshttp_request_bytes: Histogram of the bytes transferred during http requests
Available labels includes scheme, namespace, root, operation
We will need to implement the following new methods for different metrics layers:
/// Observe the http request duration in seconds.
fn observe_http_request_duration_seconds(
&self,
info: Arc<AccessorInfo>,
op: Operation,
duration: Duration,
) {
let _ = (info, op, duration);
}
/// Observe the operation bytes happened in http request like read and write.
fn observe_http_request_bytes(&self, info: Arc<AccessorInfo>, op: Operation, bytes: usize) {
let _ = (info, op, bytes);
}Refer to the OtelMetricsLayer as an example: #5800
Metrics
- http request metrics: feat(core): Implement http related metrics support for prom client #5798
Update Layers for http request metrics
- PrometheusLayer: feat(core/layers): implement http related metrics support for prometheus #5847
- PrometheusClientLayer: feat(core): Implement http related metrics support for prom client #5798
- OtelMetricsLayer: feat(core): Implement http related metrics support for otel #5800
- MetricsLayer: feat(core/layers): implement http related metrics support for metrics #5848
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coregood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed