{"id":28448435,"url":"https://github.com/highlight/otel-flask-example","last_synced_at":"2026-02-19T01:32:35.383Z","repository":{"id":275853760,"uuid":"927398580","full_name":"highlight/otel-flask-example","owner":"highlight","description":"An example repo for a flask app built with opentelemetry","archived":false,"fork":false,"pushed_at":"2025-02-19T19:54:46.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T08:58:05.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/highlight.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":"2025-02-04T22:15:52.000Z","updated_at":"2025-04-02T23:20:25.000Z","dependencies_parsed_at":"2025-02-04T23:38:18.436Z","dependency_job_id":null,"html_url":"https://github.com/highlight/otel-flask-example","commit_stats":null,"previous_names":["highlight/otel-flask-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/highlight/otel-flask-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlight%2Fotel-flask-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlight%2Fotel-flask-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlight%2Fotel-flask-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlight%2Fotel-flask-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/highlight","download_url":"https://codeload.github.com/highlight/otel-flask-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlight%2Fotel-flask-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29600752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"ssl_error","status_checked_at":"2026-02-19T00:59:36.936Z","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":[],"created_at":"2025-06-06T13:08:34.995Z","updated_at":"2026-02-19T01:32:35.360Z","avatar_url":"https://github.com/highlight.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenTelemetry Flask Example\n\nThis repository is built by [highlight.io](https://highlight.io), an open source observability platform that has both a cloud service and a self-hosted offering. OpenTelemetry is a spec supported by many observability providers, but if you want an opinionated, easy to use, and fully featured observability platform, you can head over to [highlight.io](https://highlight.io).\n\n## What is this repository?\n\nThis repository is a simple Flask application that demonstrates how to use OpenTelemetry to instrument a Flask application. For the full guide, see this [blog post](https://www.highlight.io/blog/the-complete-guide-to-python-and-opentelemetry).  \n\nThis repository covers:\n- [x] Setting up basic logs, traces, and metrics and how to forward this over to an OTEL backend (see `o11y.py`)\n- [x] Catching every incoming request using the standard `traceparent` header, and creating a span for each request\n- [x] Instrumenting outgoing requests using the `requests` library\n\n## Development Setup\n\n### Prerequisites\n- Python 3.8 or higher\n- [Poetry](https://python-poetry.org/docs/#installation)\n\n### Installation Steps\n1. Clone the repository\n2. Configure your `HIGHLIGHT_PROJECT_ID` in a .env file (or your vendor's specific config) in `o11y.py`\n3. Install dependencies:\n   ```bash\n   poetry install --no-root\n   ```\n\n4. Run the app:\n   ```bash\n   poetry run python main.py\n   ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhighlight%2Fotel-flask-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhighlight%2Fotel-flask-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhighlight%2Fotel-flask-example/lists"}