{"id":15471086,"url":"https://github.com/mohammed90/caddy_profiling","last_synced_at":"2025-04-11T07:48:00.813Z","repository":{"id":66369447,"uuid":"603242848","full_name":"mohammed90/caddy_profiling","owner":"mohammed90","description":"Continuous profiling app for Caddy","archived":false,"fork":false,"pushed_at":"2024-09-11T22:50:52.000Z","size":97,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T05:23:32.948Z","etag":null,"topics":["caddy","caddyserver","continuous-profiling","monitoring","observability","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/mohammed90.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}},"created_at":"2023-02-17T23:25:47.000Z","updated_at":"2024-09-11T22:50:55.000Z","dependencies_parsed_at":"2024-10-13T14:13:30.815Z","dependency_job_id":"fe031010-81a7-45d9-8de5-269d65cc0144","html_url":"https://github.com/mohammed90/caddy_profiling","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"644edd8d49416bd2bd5d63f435025e3e03a9c26a"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy_profiling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy_profiling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy_profiling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy_profiling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammed90","download_url":"https://codeload.github.com/mohammed90/caddy_profiling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248359562,"owners_count":21090546,"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":["caddy","caddyserver","continuous-profiling","monitoring","observability","pyroscope"],"created_at":"2024-10-02T02:09:04.149Z","updated_at":"2025-04-11T07:48:00.792Z","avatar_url":"https://github.com/mohammed90.png","language":"Go","readme":"Continuous Profiling for Caddy\n========================\n\nThe package contains 3 Caddy modules for push-mode continuous profiling support in Caddy.\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/mohammed90/caddy_profiling.svg)](https://pkg.go.dev/github.com/mohammed90/caddy_profiling)\n\n## Modules\n\n### `profiling`\n\nThe module can only serve as an app that is the host for multiple other profilers to configure and propagate common profiling parameters, i.e. [CPU profile rate](https://pkg.go.dev/runtime#SetCPUProfileRate), [block profile rate](https://pkg.go.dev/runtime#SetBlockProfileRate), [mutex profile fraction](https://pkg.go.dev/runtime#SetMutexProfileFraction), and the enabled profile types.\n\nDocumentation: [https://caddyserver.com/docs/json/apps/profiling/](https://caddyserver.com/docs/json/apps/profiling/)\n\n#### Sample config\n\n```json\n{\n\t\"apps\": {\n\t\t\"profiling\": {\n\t\t\t\"cpu_profile_rate\": 2,\n\t\t\t\"block_profile_rate\": 2,\n\t\t\t\"mutex_profile_fraction\": 2,\n\t\t\t\"profile_types\": [\"cpu\",\"heap\",\"allocs\",\"goroutine\"],\n\t\t\t\"profilers\": [\n\t\t\t\t{\n\t\t\t\t\t\"profiler\": \"pyroscope\",\n\t\t\t\t\t\"server_address\": \"http://localhost:4040\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"profiler\": \"pyroscope\",\n\t\t\t\t\t\"server_address\": \"http://another-instance.local:4040\",\n\t\t\t\t\t\"profile_types\": [\"heap\"]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"profiler\": \"profefe\",\n\t\t\t\t\t// rest of config\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t}\n}\n```\n\n### `pyroscope`\n\nConfigures and enables the push-mode [Pyroscope](https://pyroscope.io/) agent. May serve as an app or a child module of the `profiling` app. It may be configured as a child profiler of the `profilig` app or as first-level app within Caddy. Configuring the `pyroscope` app may look like this:\n\n```json\n{\n\t\"apps\": {\n\t\t\"pyroscope\": {\n\t\t\t\"server_address\": \"http://localhost:4040\",\n\t\t\t\"application_name\": \"my_cool_app\",\n\t\t\t\"auth_token\": \"{env.PYROSCOPE_AUTH_TOKEN}\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"cpu_profile_rate\": 2,\n\t\t\t\t\"block_profile_rate\": 2,\n\t\t\t\t\"mutex_profile_fraction\": 2,\n\t\t\t\t\"profile_types\": [\"cpu\",\"heap\",\"allocs\",\"goroutine\"]\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\nDocumentation: [https://caddyserver.com/docs/json/apps/pyroscope/](https://caddyserver.com/docs/json/apps/pyroscope/)\n\n### `profefe`\n\nSimilar to the `pyroscope` module, the `profefe` module configures and pushes data to [Profefe](https://github.com/profefe/profefe) server. May serve as an app or a child module of the `profiling` app. It may be configured as a child profiler of the `profilig` app or as first-level app within Caddy. Configuring the `profefe` app may look like this:\n\n```json\n{\n\t\"apps\": {\n\t\t\"profefe\": {\n\t\t\t\"address\": \"http://localhost:4040\",\n\t\t\t\"service\": \"my_cool_app\",\n\t\t\t\"timeout\": \"10m\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"cpu_profile_rate\": 2,\n\t\t\t\t\"block_profile_rate\": 2,\n\t\t\t\t\"mutex_profile_fraction\": 2,\n\t\t\t\t\"profile_types\": [\"cpu\",\"heap\",\"allocs\",\"goroutine\"]\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\nDocumentation: [https://caddyserver.com/docs/json/apps/profefe/](https://caddyserver.com/docs/json/apps/profefe/)\n\n## Available Profile Types\n\nThe `ProfileTypes` field in `Parameters` accepts the following values:\n\n- `goroutine`: stack traces of all current goroutines\n- `heap`: a sampling of memory allocations of live objects\n- `allocs`: a sampling of all past memory allocations\n- `threadcreate`: stack traces that led to the creation of new OS threads\n- `block`: stack traces that led to blocking on synchronization primitives\n- `mutex`: stack traces of holders of contended mutexes\n\nThey may be overridden by the individual guest profilers, if the guest module chooses to do so. The guest modules may not support the same types and they may have different names for the same types. The guest profilers own the translation logic.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammed90%2Fcaddy_profiling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammed90%2Fcaddy_profiling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammed90%2Fcaddy_profiling/lists"}