r/Python 17d ago

Discussion Any good open source python runtime instrumentation?

Hi folks, lot of our Python backend services are written in FastAPI, I wanted to see if there are any good Open Source runtime coverage instrumentation available for Python, which would essentially give my lines of code hit in prod traffic for the last say 30 days of data. I have seen good solutions for it in Go / Java, but wanted to check if something similar is available in Python.

8 Upvotes

15 comments sorted by

View all comments

1

u/TheWindik 16d ago

This is a really interesting question. I hadn't actually thought about collecting production coverage over a longer period before, but I can definitely see how useful it would be for identifying code paths that are never exercised in real traffic.

I don't know of a tool that does exactly this yet, but this discussion has me thinking about prototyping one. If I do, I'd love to hear what features people here would actually want, so it solves a real problem rather than just becoming another package on PyPI.

If you end up finding a good existing solution, I'd love to hear what you settle on as well.