{"id":13630242,"url":"https://github.com/trstringer/otel-shopping-cart","last_synced_at":"2026-03-11T17:02:06.028Z","repository":{"id":147740200,"uuid":"517136870","full_name":"trstringer/otel-shopping-cart","owner":"trstringer","description":"Sample application illustrating multiple aspects of observability with OpenTelemetry","archived":false,"fork":false,"pushed_at":"2024-07-03T19:28:07.000Z","size":32996,"stargazers_count":87,"open_issues_count":19,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-24T05:08:04.509Z","etag":null,"topics":["devops","metrics","observability","opentelemetry","telemetry","traces"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trstringer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-07-23T18:37:14.000Z","updated_at":"2024-12-06T18:08:37.000Z","dependencies_parsed_at":"2024-06-21T17:59:00.896Z","dependency_job_id":"fbbfe5f6-59cc-496d-af98-37325e64a34d","html_url":"https://github.com/trstringer/otel-shopping-cart","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fotel-shopping-cart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fotel-shopping-cart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fotel-shopping-cart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fotel-shopping-cart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trstringer","download_url":"https://codeload.github.com/trstringer/otel-shopping-cart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231949235,"owners_count":18450463,"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":["devops","metrics","observability","opentelemetry","telemetry","traces"],"created_at":"2024-08-01T22:01:35.347Z","updated_at":"2026-03-11T17:02:05.930Z","avatar_url":"https://github.com/trstringer.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# OpenTelemetry shopping cart application\n\nSample application to highlight distributed tracing and other aspects with [OpenTelemetry](https://opentelemetry.io/) including:\n\n* Microservices\n* Traffic generator\n* Quality of service interruptor\n* Traces, metrics, and logs all through OpenTelemetry\n* A variety of observability backends for consumption\n\n## Why?\n\nOpenTelemetry can be thought of as observability middleware:\n\n![Middleware](./images/why_overview.png)\n\nThese three \"layers\" can be considered a full implementation. This repo aims at providing all of them (the microservices applications, the OpenTelemetry implementation, and observability backends).\n\nInstead of taking an opinionated approach on what observability backends should be included, this ships multiple:\n\n* Metrics - Prometheus\n* Traces - Jaeger and Grafana Tempo\n* Logs - Elasticsearch and Grafana Loki\n\n## Usage\n\nThere are a few ways to \"use\" this repository...\n\n### Everything running local in a new kind cluster\n\n```bash\nmake run-local\n```\n\n### Everything in an existing cluster\n\n```bash\nmake install-tools-and-app\n```\n\n### Just the sample application\n\n```bash\nmake install-app\n```\n\n### Just the observability tools\n\n```bash\nmake install-tools\n```\n\n## Viewing telemetry\n\n### Traces\n\n#### Jaeger\n\n```bash\n$ make port-forward-jaeger\n```\n\n![Jaeger](./images/traces_jaeger.png)\n\n#### Tempo\n\n```bash\n$ make port-forward-grafana\n```\n\n![Tempo](./images/traces_tempo.png)\n\n### Metrics\n\n```bash\n$ make port-forward-grafana\n```\n\n![Prometheus](./images/metrics_prometheus.png)\n\n### Logs\n\n#### Elasticsearch\n\n```bash\n$ make port-forward-kibana\n```\n\n![Elasticsearch](./images/logs_elasticsearch.png)\n\n#### Loki\n\n```bash\n$ make port-forward-grafana\n```\n\n![Loki](./images/logs_loki.png)\n\n## Cleanup\n\nTo cleanup the local environment:\n\n```\n$ make stop-local\n```\n\n## Application design\n\n![Application design](./images/otel-shopping-cart-design.png)\n\nThere are three services in this application:\n\n* **Cart** - Service handling user requests for shopping cart data (written in Go)\n* **User** - Handles user verification and lookup requests from the cart service (written in Go)\n* **Price** - Serves update pricing information for products (written in Python)\n\nThe backend persistent application data storage is with **PostgreSQL**.\n\nInstrumentation is entirely with OpenTelemetry's APIs and SDKs. Telemetry collection is achieved through the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) sending trace data to Jaeger.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fotel-shopping-cart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrstringer%2Fotel-shopping-cart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fotel-shopping-cart/lists"}