Skip to content

mariano-tp/fastapi-observability-demo

tests docker-build CodeQL last commit release license: MIT stars

FastAPI Observability Demo

Minimal API with FastAPI exposing /metrics via prometheus-fastapi-instrumentator.
Portfolio-oriented: pytest tests and CI in GitHub Actions (tests + image build, no push).

100% web: no local install needed. Push this repo and run the workflows in Actions.

Endpoints

  • GET /health{"status":"ok"}
  • GET /predict?x=<float>&y=<float> → simple sum
  • GET /metrics → Prometheus metrics

How to test (CI)

  • Actions → Run workflow for: ci.yml (tests) and docker-ci.yml (build without push).

Structure

.
├── app/
│   └── main.py
├── tests/
│   └── test_app.py
├── Dockerfile
├── requirements.txt
├── pytest.ini
└── .github/workflows/
    ├── ci.yml
    └── docker-ci.yml

Credits

Portfolio repository by @mariano-tp. Licensed under MIT.

See also: Code of Conduct · Contributing · Security

About

FastAPI + Prometheus metrics (/metrics) with CI (pytest, Docker build, CodeQL).

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •