{"id":44646841,"url":"https://github.com/observatorium/observable-demo","last_synced_at":"2026-02-14T20:09:11.065Z","repository":{"id":57534356,"uuid":"232788852","full_name":"observatorium/observable-demo","owner":"observatorium","description":"Demo of the instrumented L7 HTTP loadbalancer in Go following best practices.","archived":false,"fork":false,"pushed_at":"2020-01-26T10:33:22.000Z","size":75,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T06:42:07.017Z","etag":null,"topics":["best-practices","demo","instrumentation","loadbalancer","metrics","prometheus"],"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/observatorium.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":"2020-01-09T11:01:57.000Z","updated_at":"2023-07-07T10:57:12.000Z","dependencies_parsed_at":"2022-09-26T18:21:32.854Z","dependency_job_id":null,"html_url":"https://github.com/observatorium/observable-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/observatorium/observable-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observatorium%2Fobservable-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observatorium%2Fobservable-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observatorium%2Fobservable-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observatorium%2Fobservable-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/observatorium","download_url":"https://codeload.github.com/observatorium/observable-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observatorium%2Fobservable-demo/sbom","scorecard":{"id":701164,"data":{"date":"2025-08-11","repo":{"name":"github.com/observatorium/observable-demo","commit":"15a3f707e7aa72ffa1c3802ee2dafe949b1f9f68"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":7,"reason":"Found 8/11 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:8","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0322 / GHSA-cg3q-j54f-5p7p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T05:14:42.051Z","repository_id":57534356,"created_at":"2025-08-22T05:14:42.051Z","updated_at":"2025-08-22T05:14:42.051Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29454909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"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":["best-practices","demo","instrumentation","loadbalancer","metrics","prometheus"],"created_at":"2026-02-14T20:09:10.576Z","updated_at":"2026-02-14T20:09:11.058Z","avatar_url":"https://github.com/observatorium.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# observable-demo\n\n[![semver](https://img.shields.io/badge/semver--0.0.0-blue.svg?cacheSeconds=2592000)](https://github.com/observatorium/observable-demo/releases) [![Maintenance](https://img.shields.io/maintenance/yes/2020.svg)](https://github.com/observatorium/observable-demo/commits/master) [![Build Status](https://cloud.drone.io/api/badges/observatorium/observable-demo/status.svg)](https://cloud.drone.io/observatorium/observable-demo)[![Go Doc](https://godoc.org/github.com/observatorium/observable-demo?status.svg)](http://godoc.org/github.com/observatorium/observable-demo) [![Go Report Card](https://goreportcard.com/badge/github.com/observatorium/observable-demo)](https://goreportcard.com/report/github.com/observatorium/observable-demo)\n\nThis repository includes simple L7 round robin loadbalancer implementation, instrumented with metrics.\n\n\u003e `WARNING` : This is not meant to be production ready L7 loadbalancer. It's missing things like proper retrying, DNS discovery, logging, tracing etc, that might be added in future (:\n\n\u003cimg src=\"https://docs.google.com/drawings/d/e/2PACX-1vSp_CcK4aH5w9uUHUHOnWmtaLdxr6zet5UO6dVN2jXhag0x8UMPEn5sy3acF8B4QnJVRyOVBknp5Eij/pub?w=1440\u0026amp;h=1080\"\u003e\n\nThis implementation was **mainly** used for presentations that showcase best practices for Prometheus based metrics Go instrumentation like:\n\n* [Avoiding globals](https://github.com/observatorium/observable-demo/blob/e89e67a9e3e564d1ab3cb716835c8969f4bc1201/pkg/lbtransport/transport.go#L31).\n* [Middlewares](https://github.com/observatorium/observable-demo/blob/e89e67a9e3e564d1ab3cb716835c8969f4bc1201/pkg/exthttp/middleware.go#L82) and [Tripperwares](https://github.com/observatorium/observable-demo/blob/d9cf53a171f4b016512337faa3e36411830525df/pkg/exthttp/tripperware.go#L46).\n* Histograms [usage](https://github.com/observatorium/observable-demo/blob/e89e67a9e3e564d1ab3cb716835c8969f4bc1201/pkg/lbtransport/transport.go#L43).\n* [Avoiding high cardinality](https://github.com/observatorium/observable-demo/blob/e89e67a9e3e564d1ab3cb716835c8969f4bc1201/pkg/lbtransport/transport.go#L42).\n* [Initialising metrics](https://github.com/observatorium/observable-demo/blob/e89e67a9e3e564d1ab3cb716835c8969f4bc1201/pkg/lbtransport/transport.go#L62).\n* [Wrapping registries](https://github.com/observatorium/observable-demo/blob/e89e67a9e3e564d1ab3cb716835c8969f4bc1201/pkg/exthttp/middleware.go#L84).\n* Naming conventions\n* [Testing metrics](https://github.com/observatorium/observable-demo/blob/d9cf53a171f4b016512337faa3e36411830525df/pkg/lbtransport/transport_test.go#L189)\n\n## Using demo\n\nThis demo is runable.\n\nTo run loadbalancer and Prometheus in docker run:\n\n``` console\nmake demo\n```\n\nAfter this, you should be able to go via browser to:\n\n* `http://localhost:8080/lb` for load balancing endpoint, that loadbalanced to 3 fake endpoints.\n* `http://localhost:8080/metrics` for metric page\n* `http://localhost:9090` for Prometheus UI that scrapes loadbalancer every second.\n\nTo curl loadbalancer every 500ms to generate traffic run in separate terminal:\n\n``` console\nmake demo-test\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobservatorium%2Fobservable-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobservatorium%2Fobservable-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobservatorium%2Fobservable-demo/lists"}