{"id":17810771,"url":"https://github.com/favourdaniel/monitor-flask-app-metrics-with-prometheus-format","last_synced_at":"2025-04-02T07:13:18.710Z","repository":{"id":208630520,"uuid":"722102399","full_name":"FavourDaniel/Monitor-Flask-App-metrics-with-Prometheus-format","owner":"FavourDaniel","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-27T05:39:58.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T21:41:25.546Z","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/FavourDaniel.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":"2023-11-22T12:47:39.000Z","updated_at":"2023-11-22T12:50:07.000Z","dependencies_parsed_at":"2023-11-22T14:27:05.280Z","dependency_job_id":"8e7822f9-bc3a-4680-be47-df66b3497427","html_url":"https://github.com/FavourDaniel/Monitor-Flask-App-metrics-with-Prometheus-format","commit_stats":null,"previous_names":["favourdaniel/monitor-flask-app-metrics-with-prometheus-format"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2FMonitor-Flask-App-metrics-with-Prometheus-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2FMonitor-Flask-App-metrics-with-Prometheus-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2FMonitor-Flask-App-metrics-with-Prometheus-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2FMonitor-Flask-App-metrics-with-Prometheus-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FavourDaniel","download_url":"https://codeload.github.com/FavourDaniel/Monitor-Flask-App-metrics-with-Prometheus-format/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246769968,"owners_count":20830771,"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":[],"created_at":"2024-10-27T15:40:18.685Z","updated_at":"2025-04-02T07:13:18.693Z","avatar_url":"https://github.com/FavourDaniel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monitor-Flask-App-metrics-with-Prometheus-format\nThis is a simple Flask application that exposes metrics in Prometheus format using the [prometheus_flask_exporter](https://github.com/rycus86/prometheus_flask_exporter).\nTo run the app, you need to have Python and pip installed on your machine, then install the required dependencies.\n\n## Steps to run Flask app\n1. Activate your virtual environment (if not already activated)\n```\nsource venv/bin/activate   # On macOS or Linux\n```\n2. Install required packages\n```\npython -m pip install flask prometheus_flask_exporter\npython -m pip install requests\n```\n3. Start the flask application\n```\npython app.py\n```\nThe different endpoints for the application are `127.0.0.1:5000/one`, `127.0.0.1:5000/two`, `127.0.0.1:5000/three`, `127.0.0.1:5000/four` and `127.0.0.1:5000/error`.\n\n4. In a new terminal, start the generator\n```\npython app-generator.py\n```\nIt will be used in generating request for the Flask application at the different endpoints.\n\n5. Send the metrics to a monitoring tool for visualization. You can do this with OpenTelemetry and SigNoz, read the article [here](https://signoz.io/blog/opentelemetry-collector-prometheus-receiver/).\n\n![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cbzf58qelvvm2tmb4mn6.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffavourdaniel%2Fmonitor-flask-app-metrics-with-prometheus-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffavourdaniel%2Fmonitor-flask-app-metrics-with-prometheus-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffavourdaniel%2Fmonitor-flask-app-metrics-with-prometheus-format/lists"}