{"id":21382304,"url":"https://github.com/zaphar/tower-trace-metrics","last_synced_at":"2026-07-16T17:37:09.318Z","repository":{"id":66591215,"uuid":"595374410","full_name":"zaphar/tower-trace-metrics","owner":"zaphar","description":"A tower-http TraceLayer that records metrics.","archived":false,"fork":false,"pushed_at":"2023-02-04T15:50:33.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T08:12:32.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaphar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-31T00:09:22.000Z","updated_at":"2024-05-06T05:51:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb6792b8-9972-4b1b-b73f-ae886cac2fec","html_url":"https://github.com/zaphar/tower-trace-metrics","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zaphar/tower-trace-metrics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaphar%2Ftower-trace-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaphar%2Ftower-trace-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaphar%2Ftower-trace-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaphar%2Ftower-trace-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaphar","download_url":"https://codeload.github.com/zaphar/tower-trace-metrics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaphar%2Ftower-trace-metrics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35553295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T10:58:37.971Z","updated_at":"2026-07-16T17:37:09.274Z","avatar_url":"https://github.com/zaphar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n Copyright 2023 Jeremy Wall (Jeremy@marzhilsltudios.com)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n     http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n--\u003e\n# tower-trace-metrics\n\nA [tower-http](https://crates.io/crates/tower-http) `TraceLayer` that records metrics using the [metrics](https://crates.io/crates/metrics) facade.\n\n```rust\nuse tower_trace_metrics::make_layer;\nuse tower::ServiceBuilder;\nuse bytes;\n\n\nfn main() {\n    let service = ServiceBuilder::new()\n        // Make a trace layer where the chunks are bytes::Bytes\n        .layer(make_layer(|b: \u0026bytes::Bytes| b.len() as u64));\n    // ... Use this service in a Tower middleware stack.\n}\n```\n\n## Recorded Metrics\n\n* http_request_counter The total count of all requests\n* http_request_failure_counter The total count of all request failures\n* http_request_size_bytes_hist A histogram of request size in bytes\n* http_request_request_time_micros_hist A histogram of request time in microseconds\n\nEach metric is faceted by `path`, `method`, and `host` for the request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaphar%2Ftower-trace-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaphar%2Ftower-trace-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaphar%2Ftower-trace-metrics/lists"}