{"id":15162069,"url":"https://github.com/kostis-codefresh/prometheus-sample-app","last_synced_at":"2026-02-18T17:31:08.276Z","repository":{"id":109860679,"uuid":"350349055","full_name":"kostis-codefresh/prometheus-sample-app","owner":"kostis-codefresh","description":"Example Go app that exposes prometheus metrics","archived":false,"fork":false,"pushed_at":"2021-03-24T17:10:25.000Z","size":133,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T12:39:50.658Z","etag":null,"topics":["docker-compose","golang","graphana","prometheus"],"latest_commit_sha":null,"homepage":"","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/kostis-codefresh.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":"2021-03-22T13:13:49.000Z","updated_at":"2024-04-25T21:27:28.000Z","dependencies_parsed_at":"2023-06-12T08:15:19.384Z","dependency_job_id":null,"html_url":"https://github.com/kostis-codefresh/prometheus-sample-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kostis-codefresh/prometheus-sample-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Fprometheus-sample-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Fprometheus-sample-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Fprometheus-sample-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Fprometheus-sample-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kostis-codefresh","download_url":"https://codeload.github.com/kostis-codefresh/prometheus-sample-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Fprometheus-sample-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29587076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker-compose","golang","graphana","prometheus"],"created_at":"2024-09-27T01:04:56.144Z","updated_at":"2026-02-18T17:31:08.234Z","avatar_url":"https://github.com/kostis-codefresh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example Go app that exposes Prometheus metrics\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/kostis-codefresh/prometheus-sample-app)](https://goreportcard.com/report/github.com/kostis-codefresh/prometheus-sample-app)\n\n![Graphana Dashboard](graphana-dashboard.png)\n\nOriginal code modified from https://gabrieltanner.org/blog/collecting-prometheus-metrics-in-golang\n\n\n## How to build\n\nRun:\n\n *  `go build` to get the executable OR\n *  `docker build . -t example-app` to create a container image if you prefer docker instead or don't have access to a Go dev environment\n\n## How to run the application on its own\n\n * `go run .` OR\n * `docker run -p 8080:8080 example-app`\n\n Then visit http://localhost:8080 or http://localhost:8080/metrics\n\n ## How to run with Prometheus and Graphana\n\n Run `docker-compose up`\n\n You can access Prometheus at http://localhost:9090 and Graphana at http://localhost:3000\n\n1. Login into Graphana. Default user/password for Graphana is admin/admin\n1. Add a datasource for type Prometheus at address http://localhost:9090 and auth type \"Browser\" \n1. Import [graphana/graphana-dashboard.json](graphana/graphana-dashboard.json) as a premade dashboard\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostis-codefresh%2Fprometheus-sample-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkostis-codefresh%2Fprometheus-sample-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostis-codefresh%2Fprometheus-sample-app/lists"}