{"id":34828020,"url":"https://github.com/urjitbhatia/tracer","last_synced_at":"2026-05-24T03:33:36.908Z","repository":{"id":57522168,"uuid":"144235798","full_name":"urjitbhatia/tracer","owner":"urjitbhatia","description":"Annotate a golang http request to trace time taken at various steps","archived":false,"fork":false,"pushed_at":"2018-08-10T07:19:48.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-24T03:33:30.156Z","etag":null,"topics":["golang","http","httptracer","tracing"],"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/urjitbhatia.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":"2018-08-10T04:14:55.000Z","updated_at":"2018-08-10T07:19:49.000Z","dependencies_parsed_at":"2022-08-26T23:41:14.701Z","dependency_job_id":null,"html_url":"https://github.com/urjitbhatia/tracer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/urjitbhatia/tracer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urjitbhatia%2Ftracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urjitbhatia%2Ftracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urjitbhatia%2Ftracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urjitbhatia%2Ftracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urjitbhatia","download_url":"https://codeload.github.com/urjitbhatia/tracer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urjitbhatia%2Ftracer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33420660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"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":["golang","http","httptracer","tracing"],"created_at":"2025-12-25T15:28:56.821Z","updated_at":"2026-05-24T03:33:36.902Z","avatar_url":"https://github.com/urjitbhatia.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tracer\nAnnotate a golang http request to trace time taken at various steps.\n\nHeavily inspired by https://github.com/davecheney/httpstat :)\n\nNote: Just as any other instrumentation tool, don't keep this running in production forever without understanding the cost. If you are doing a lot of requests, this might have some (tiny) impact.\n\n# Usage:\n```golang\nimport \"github.com/urjitbhatia/tracer\"\n\nreq, _ := http.NewRequest(http.MethodGet, \"http://golang.org\", body)\nreq, tr = tracer.AsTraceableReq(req)\n// ...\nresp, err := client.Do(req)\nif err != nil {\n    log.Fatalf(\"failed to read response: %v\", err)\n}\nbody := readResponseBody(req, resp)\nresp.Body.Close()\n// Important to call this to calculate total time taken, otherwise it will be negative\ntr.Finish()\n\n// ..\nlog.Printlf(\"Tracer stats: %v\", tr)\n```\n```\n2018/08/10 06:23:48 Tracer stats: {\"total\":1.917301,\"dnsLookup\":0.526224, \"tcpDialed\":0.170330, \"connSetup\":0.684807, \"preTransfer\":1.211031, \"ttfb\":1.917138, \"serverProcessing\":0.706107, \"contentTransfer\":0.000162}\n```\n\n##### If you see bugs, please feel free to post issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furjitbhatia%2Ftracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furjitbhatia%2Ftracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furjitbhatia%2Ftracer/lists"}