{"id":41108320,"url":"https://github.com/carousell/md-fasthttp-prometheus-middleware","last_synced_at":"2026-01-22T15:29:30.025Z","repository":{"id":42459943,"uuid":"259283126","full_name":"carousell/md-fasthttp-prometheus-middleware","owner":"carousell","description":"Prometheus middleware for fasthttp, fasthttp/router","archived":false,"fork":false,"pushed_at":"2025-11-21T10:23:15.000Z","size":689,"stargazers_count":13,"open_issues_count":3,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-11-21T12:17:04.471Z","etag":null,"topics":["fasthttp","mudah","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carousell.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":"2020-04-27T10:39:43.000Z","updated_at":"2025-06-04T03:55:42.000Z","dependencies_parsed_at":"2024-06-19T04:07:57.211Z","dependency_job_id":"8ae77da7-49d2-4399-a1da-82cd74436eca","html_url":"https://github.com/carousell/md-fasthttp-prometheus-middleware","commit_stats":null,"previous_names":["carousell/md-fasthttp-prometheus-middleware","carousell/fasthttp-prometheus-middleware"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/carousell/md-fasthttp-prometheus-middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carousell%2Fmd-fasthttp-prometheus-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carousell%2Fmd-fasthttp-prometheus-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carousell%2Fmd-fasthttp-prometheus-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carousell%2Fmd-fasthttp-prometheus-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carousell","download_url":"https://codeload.github.com/carousell/md-fasthttp-prometheus-middleware/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carousell%2Fmd-fasthttp-prometheus-middleware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28665389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T14:01:31.714Z","status":"ssl_error","status_checked_at":"2026-01-22T13:59:23.143Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fasthttp","mudah","prometheus"],"created_at":"2026-01-22T15:29:27.185Z","updated_at":"2026-01-22T15:29:30.016Z","avatar_url":"https://github.com/carousell.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fasthttp prometheus-middleware\nPrometheus middleware for [fasthttp](https://github.com/valyala/fasthttp) \n\nExports metrics for request duration ```request_duration_seconds``` \nwith http status code as ```code``` and http request method + endpoint/route as ```path``` \nf.e ```code=\"200\",path=\"GET_/health\"```, ```code=\"201\",path=\"POST_/foo\"``` \n\n## Example \nusing fasthttp/router\n\n    package main\n\n    import (\n\t\"log\"\n\n\tfasthttpprom \"github.com/carousell/fasthttp-prometheus-middleware\"\n\t\"github.com/fasthttp/router\"\n\t\"github.com/valyala/fasthttp\"\n\t)\n\n    func main() {\n\n\t\tr := router.New()\n\t\tp := fasthttpprom.NewPrometheus(\"\")\n\t\tp.Use(r)\n\n\t\tr.GET(\"/health\", func(ctx *fasthttp.RequestCtx) {\n\t\t\tctx.SetStatusCode(200)\n\t\t\tctx.SetBody([]byte(`{\"status\": \"pass\"}`))\n\t\t\tlog.Println(string(ctx.Request.URI().Path()))\n\t\t})\n\n\t\tlog.Println(\"main is listening on \", \"8080\")\n\t\tlog.Fatal(fasthttp.ListenAndServe(\":\"+\"8080\", p.Handler))\n\t\n    }\n\nExample metrics for above code in /metrics endpoint\n\n```request_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.005\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.01\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.02\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.04\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.06\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.08\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.1\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.15\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.25\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.4\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.6\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"0.8\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"1\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"1.5\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"2\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"3\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"5\"} 25063\nrequest_duration_seconds_bucket{code=\"200\",path=\"GET_/health\",le=\"+Inf\"} 25063\nrequest_duration_seconds_sum{code=\"200\",path=\"GET_/health\"} 0.14781658099999923\nrequest_duration_seconds_count{code=\"200\",path=\"GET_/health\"} 25063\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarousell%2Fmd-fasthttp-prometheus-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarousell%2Fmd-fasthttp-prometheus-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarousell%2Fmd-fasthttp-prometheus-middleware/lists"}