{"id":14971843,"url":"https://github.com/grafana/pyroscope-go","last_synced_at":"2025-12-15T11:23:10.641Z","repository":{"id":38299675,"uuid":"419502891","full_name":"grafana/pyroscope-go","owner":"grafana","description":"This is the golang client integration for Pyroscope","archived":false,"fork":false,"pushed_at":"2025-05-07T03:54:43.000Z","size":347,"stargazers_count":134,"open_issues_count":15,"forks_count":24,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-14T01:23:52.453Z","etag":null,"topics":["go","golang","optimization","performance","profiler","profiling","pyroscope"],"latest_commit_sha":null,"homepage":"","language":"Go","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/grafana.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-20T22:05:08.000Z","updated_at":"2025-05-08T22:13:21.000Z","dependencies_parsed_at":"2023-09-14T10:02:23.274Z","dependency_job_id":"8ac908f2-6575-48a1-94b2-2bdcd15b4df8","html_url":"https://github.com/grafana/pyroscope-go","commit_stats":{"total_commits":89,"total_committers":17,"mean_commits":5.235294117647059,"dds":0.6404494382022472,"last_synced_commit":"ecb7b8313a48118ee3e165bd71ee0dfed950cd73"},"previous_names":["pyroscope-io/client","grafana/pyroscope-go","grafana/pyroscope-golang"],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpyroscope-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpyroscope-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpyroscope-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpyroscope-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grafana","download_url":"https://codeload.github.com/grafana/pyroscope-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227612,"owners_count":22035669,"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":["go","golang","optimization","performance","profiler","profiling","pyroscope"],"created_at":"2024-09-24T13:45:55.078Z","updated_at":"2025-12-15T11:23:10.559Z","avatar_url":"https://github.com/grafana.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pyroscope Golang Client\n\nThis is a golang integration for Pyroscope — open source continuous profiling platform.\n\nFor more information, please visit our [golang integration documentation](https://grafana.com/docs/pyroscope/latest/configure-client/language-sdks/go_push/).\n\n## Profiling Go applications\n\nTo start profiling a Go application, you need to include our Go module in your app:\n\n```\ngo get github.com/grafana/pyroscope-go\n```\n\nThen add the following code to your application:\n\n```go\npackage main\n\nimport \"github.com/grafana/pyroscope-go\"\n\nfunc main() {\n  pyroscope.Start(pyroscope.Config{\n    ApplicationName: \"simple.golang.app\",\n\n    // replace this with the address of pyroscope server\n    ServerAddress:   \"http://pyroscope-server:4040\",\n\n    // you can disable logging by setting this to nil\n    Logger:          pyroscope.StandardLogger,\n\n    // Optional HTTP Basic authentication (Grafana Cloud)\n    BasicAuthUser:     \"\u003cUser\u003e\",\n    BasicAuthPassword: \"\u003cPassword\u003e\",\n    // Optional Pyroscope tenant ID (only needed if using multi-tenancy). Not needed for Grafana Cloud.\n    // TenantID:          \"\u003cTenantID\u003e\",\n\n    // by default all profilers are enabled,\n    // but you can select the ones you want to use:\n    ProfileTypes: []pyroscope.ProfileType{\n      pyroscope.ProfileCPU,\n      pyroscope.ProfileAllocObjects,\n      pyroscope.ProfileAllocSpace,\n      pyroscope.ProfileInuseObjects,\n      pyroscope.ProfileInuseSpace,\n    },\n  })\n\n  // your code goes here\n}\n```\n\n### Tags\n\nIt is possible to add tags (labels) to the profiling data. These tags can be used to filter the data in the UI.\n\n```go\n// these two ways of adding tags are equivalent:\npyroscope.TagWrapper(context.Background(), pyroscope.Labels(\"controller\", \"slow_controller\"), func(c context.Context) {\n  slowCode()\n})\n\npprof.Do(context.Background(), pprof.Labels(\"controller\", \"slow_controller\"), func(c context.Context) {\n  slowCode()\n})\n```\n\n### Pull Mode\n\nGo integration supports pull mode, which means that you can profile applications without adding any extra code. For that to work you will need to make sure you have profiling routes (`/debug/pprof`) enabled in your http server. Generally, that means that you need to add `net/http/pprof` package:\n\n```go\nimport _ \"net/http/pprof\"\n```\n\n## Examples\n\nCheck out the [examples](https://github.com/grafana/pyroscope-go/tree/main/example) directory in our repository to learn more. 🔥\n\n## Maintainers\n\nThis package is maintained by [@grafana/pyroscope-go](https://github.com/orgs/grafana/teams/pyroscope-go). Mention this team on issues or PRs for feedback.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fpyroscope-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrafana%2Fpyroscope-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fpyroscope-go/lists"}