https://github.com/ezzaldeeen/promex
Playing with Prometheus
https://github.com/ezzaldeeen/promex
fastapi prometheus
Last synced: about 2 months ago
JSON representation
Playing with Prometheus
- Host: GitHub
- URL: https://github.com/ezzaldeeen/promex
- Owner: ezzaldeeen
- Created: 2023-06-25T08:21:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-29T21:53:10.000Z (about 3 years ago)
- Last Synced: 2025-02-27T23:40:45.842Z (over 1 year ago)
- Topics: fastapi, prometheus
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PromEx
## Introduction
Prometheus is an open-source monitoring and alerting toolkit that provides a flexible and powerful way to monitor systems and applications. FastAPI, on the other hand, is a Python web framework that offers high performance, easy-to-use features for building APIs.
This repository explores the integration of Prometheus monitoring into FastAPI applications, allowing you to collect metrics about your API's performance, resource usage, and other important aspects.
## Installation
To run the experiments in this repository, you'll need to have Python and pip installed. Follow these steps to set up the project:
1. Create a virtual environment (optional but recommended):
```bash
python3 -m venv env
source env/bin/activate
```
2. Install the required dependencies:
```bash
pip install -r requirements.txt
```
## Usage
To run the experiments, execute the following command:
```bash
uvicron main:app --reload
```
Once the application is running, you can access the Prometheus metrics endpoint at http://localhost:8000/metrics. This endpoint provides various metrics related to your FastAPI application, such as request duration, HTTP status codes, and more.