{"id":23590755,"url":"https://github.com/utilitywarehouse/go-operational","last_synced_at":"2025-05-07T16:12:43.211Z","repository":{"id":14763600,"uuid":"75282241","full_name":"utilitywarehouse/go-operational","owner":"utilitywarehouse","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-23T08:42:38.000Z","size":88,"stargazers_count":3,"open_issues_count":5,"forks_count":2,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-07T16:12:37.401Z","etag":null,"topics":["golang","shared-library"],"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/utilitywarehouse.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":"2016-12-01T10:34:35.000Z","updated_at":"2025-04-23T08:42:43.000Z","dependencies_parsed_at":"2024-06-19T22:47:47.642Z","dependency_job_id":"7417e3f6-1a1c-4338-9507-4acd243eb9f6","html_url":"https://github.com/utilitywarehouse/go-operational","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utilitywarehouse%2Fgo-operational","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utilitywarehouse%2Fgo-operational/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utilitywarehouse%2Fgo-operational/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utilitywarehouse%2Fgo-operational/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utilitywarehouse","download_url":"https://codeload.github.com/utilitywarehouse/go-operational/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252912997,"owners_count":21824066,"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":["golang","shared-library"],"created_at":"2024-12-27T07:15:15.492Z","updated_at":"2025-05-07T16:12:43.193Z","avatar_url":"https://github.com/utilitywarehouse.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-operational\n==============\n\nGo implementation of [operational-endpoints-spec](https://github.com/utilitywarehouse/operational-endpoints-spec) making it easy to add the standard endpoints to your application\n\nInstallation\n------------\n\n`go get github.com/utilitywarehouse/go-operational/op`\n\nExample\n-------\n\n\n```\npackage main\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/utilitywarehouse/go-operational/op\"\n)\n\nfunc main() {\n\tdm := prometheus.NewCounter(prometheus.CounterOpts{\n\t\tName: \"dummy_metric\",\n\t\tHelp: \"Dummy counter\",\n\t})\n\thttp.Handle(\"/__/\", op.NewHandler(\n\t\top.NewStatus(\"My application\", \"application that does stuff\").\n\t\t\tAddOwner(\"team x\", \"#team-x\").\n\t\t\tSetRevision(\"7470d3dc24ce7876a9fc53ca7934401273a4017a\").\n\t\t\tAddChecker(\"db check\", func(cr *op.CheckResponse) { cr.Healthy(\"dummy db connection check succeesed\") }).\n\t\t\tAddMetrics(dm).\n\t\t\tReadyUseHealthCheck(),\n\t),\n\t)\n\n\thttp.ListenAndServe(\":8080\", nil)\n}\n```\n\nPPROF\n-------\nBy default go operational will bind PPROFs handlers to the path `/__/extended/pprof/`\nWe also overload the default mux in order to stop the handlers binding to the default paths. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futilitywarehouse%2Fgo-operational","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futilitywarehouse%2Fgo-operational","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futilitywarehouse%2Fgo-operational/lists"}