https://github.com/metorresponce/fastapi-observability-demo
FastAPI + Prometheus metrics (/metrics) with CI (pytest, Docker build, CodeQL).
https://github.com/metorresponce/fastapi-observability-demo
docker fastapi github-actions metrics observability portfolio prometheus python
Last synced: about 1 month ago
JSON representation
FastAPI + Prometheus metrics (/metrics) with CI (pytest, Docker build, CodeQL).
- Host: GitHub
- URL: https://github.com/metorresponce/fastapi-observability-demo
- Owner: metorresponce
- License: mit
- Created: 2025-08-23T08:44:20.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-02-01T21:14:27.000Z (5 months ago)
- Last Synced: 2026-02-02T14:48:20.780Z (5 months ago)
- Topics: docker, fastapi, github-actions, metrics, observability, portfolio, prometheus, python
- Language: Python
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.ES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
> Available languages / Idiomas disponibles: [*English*](README.md) / [*Español*](README.ES.md)
Volver al repositorio: [Home](https://github.com/metorresponce/metorresponce/blob/main/README.ES.md)
[](https://github.com/metorresponce/fastapi-observability-demo/actions/workflows/ci.yml)
[](https://github.com/metorresponce/fastapi-observability-demo/actions/workflows/docker-ci.yml)
[](https://github.com/metorresponce/fastapi-observability-demo/actions/workflows/codeql.yml)
[](https://github.com/metorresponce/fastapi-observability-demo/commits/main)
[](https://github.com/metorresponce/fastapi-observability-demo/releases)
[](./LICENSE)
[](https://github.com/metorresponce/fastapi-observability-demo/stargazers)
# FastAPI Observability Demo
API mínima en FastAPI que expone `/metrics` mediante `prometheus-fastapi-instrumentator`.
Este repositorio está pensado para validarse completamente dentro de GitHub:
tests, análisis de seguridad y build de la imagen Docker se ejecutan en GitHub Actions.
No hace falta instalar nada en local para evaluarlo.
## Endpoints
- GET `/health` -> `{"status":"ok"}`
- GET `/predict?x=&y=` -> suma simple
- GET `/metrics` -> métricas para Prometheus
## Cómo validarlo (GitHub Actions)
Entrá en la pestaña Actions y ejecutá los workflows (o empujá un commit).
- tests (ci.yml)
Ejecuta pytest en CI.
Evidencia: logs del workflow y, si están habilitados, artifacts descargables como reportes de tests/coverage.
- docker-build (docker-ci.yml)
Construye la imagen Docker sin publicarla (sin push).
- codeql (codeql.yml)
Ejecuta análisis estático orientado a seguridad.
## Estructura
```text
.
├── app/
│ └── main.py
├── tests/
│ └── test_app.py
├── Dockerfile
├── requirements.txt
├── pytest.ini
└── .github/workflows/
├── ci.yml
├── docker-ci.yml
└── codeql.yml
```
## Créditos
Repositorio de portfolio por @metorresponce. Licencia MIT.
Ver también: [Code of Conduct](./CODE_OF_CONDUCT.md) · [Contributing](./CONTRIBUTING.md) · [Security](./SECURITY.md)