| Crates.io | reqwest-metrics |
| lib.rs | reqwest-metrics |
| version | 0.2.0 |
| created_at | 2025-05-18 06:27:04.396871+00 |
| updated_at | 2025-09-22 06:24:04.505356+00 |
| description | Metrics.rs integration for reqwest |
| homepage | |
| repository | https://github.com/ranger-ross/reqwest-metrics.git |
| max_upload_size | |
| id | 1678411 |
| size | 90,719 |
Metrics.rs integration for reqwest using reqwest-middleware
let client = ClientBuilder::new(reqwest::Client::new())
.with(MetricsMiddleware::new())
.build();
let client = ClientBuilder::new(reqwest::Client::new())
.with(
MetricsMiddleware::builder()
.http_request_method_label("method")
.http_response_status_label("status")
.server_address_label("host")
.build(),
)
.build();
Supported metrics:
Supported labels:
http_request_methodserver_addressserver_porterror_typehttp_response_status_codenetwork_protocol_namenetwork_protocol_versionurl_schemeThis crate is heavily inspired by the HTTP Client metrics provided by Spring. This crate aims to provide the same functionality while adhereing to Otel semantic conventions.