{"id":16540962,"url":"https://github.com/linki/instrumented_http","last_synced_at":"2025-06-22T17:33:36.775Z","repository":{"id":57481365,"uuid":"90283228","full_name":"linki/instrumented_http","owner":"linki","description":"A Go http.RoundTripper that exports request statistics via Prometheus.","archived":false,"fork":false,"pushed_at":"2021-04-14T14:20:57.000Z","size":38,"stargazers_count":21,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T00:14:15.758Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/linki.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}},"created_at":"2017-05-04T16:05:28.000Z","updated_at":"2024-03-24T02:43:00.000Z","dependencies_parsed_at":"2022-09-26T17:50:29.220Z","dependency_job_id":null,"html_url":"https://github.com/linki/instrumented_http","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/linki/instrumented_http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Finstrumented_http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Finstrumented_http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Finstrumented_http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Finstrumented_http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linki","download_url":"https://codeload.github.com/linki/instrumented_http/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linki%2Finstrumented_http/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261334041,"owners_count":23143266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-10-11T18:53:44.455Z","updated_at":"2025-06-22T17:33:31.761Z","avatar_url":"https://github.com/linki.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# instrumented_http\n\nA Go `http.RoundTripper` that exports request statistics via [Prometheus](https://prometheus.io/).\n\n# Example\n\nTransparently inject `instrumented_http` into any `http.Client` or `http.RoundTripper` and get metrics about all requests made.\n\n```console\n$ curl -Ss 127.0.0.1:9099/metrics | grep http\nhttp_request_duration_seconds{handler=\"instrumented_http\",host=\"my-cluster.example.org\",method=\"GET\",path=\"pods\",query=\"\",scheme=\"https\",status=\"200\",quantile=\"0.5\"} 0.83626\nhttp_request_duration_seconds{handler=\"instrumented_http\",host=\"my-cluster.example.org\",method=\"GET\",path=\"pods\",query=\"\",scheme=\"https\",status=\"200\",quantile=\"0.9\"} 0.736648\nhttp_request_duration_seconds{handler=\"instrumented_http\",host=\"my-cluster.example.org\",method=\"GET\",path=\"pods\",query=\"\",scheme=\"https\",status=\"200\",quantile=\"0.99\"} 0.736648\nhttp_request_duration_seconds_sum{handler=\"instrumented_http\",host=\"my-cluster.example.org\",method=\"GET\",path=\"pods\",query=\"\",scheme=\"https\",status=\"200\"} 0.820274243\nhttp_request_duration_seconds_count{handler=\"instrumented_http\",host=\"my-cluster.example.org\",method=\"GET\",path=\"pods\",query=\"\",scheme=\"https\",status=\"200\"} 2\n```\n\n# Usage\n\nBrowse the [examples](examples) directory to see how `instrumented_http` works with:\n* [http.DefaultClient](https://golang.org/pkg/net/http/#Client): [examples/default-client](examples/default-client)\n* a custom [http.Transport](https://golang.org/pkg/net/http/#Transport): [examples/custom-transport](examples/custom-transport)\n* the [Google CloudDNS](https://godoc.org/google.golang.org/api/dns/v1) client: [examples/googledns](examples/googledns)\n* the [AWS Route53](https://godoc.org/github.com/aws/aws-sdk-go/service/route53) client: [examples/route53](examples/route53)\n* the [AWS Route53 (v2)](https://godoc.org/github.com/aws/aws-sdk-go-v2/service/route53) client: [examples/route53v2](examples/route53v2)\n* the [Kubernetes](https://godoc.org/k8s.io/client-go) client: [examples/kubernetes](examples/kubernetes)\n* [Resty](https://github.com/go-resty/resty): [examples/resty](examples/resty)\n* [Sling](https://github.com/dghubble/sling): [examples/sling](examples/sling)\n* [Gentleman](https://github.com/h2non/gentleman): [examples/gentleman](examples/gentleman)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinki%2Finstrumented_http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinki%2Finstrumented_http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinki%2Finstrumented_http/lists"}