logfire
logfire copied to clipboard
Docs Should Better Explain How To Instrument Django ORM
A common thing that a django app may want to do is instrument the ORM queries, but the docs are not clear on how to do this. Could a section be added to the docs, something like this?
Instrumenting Django ORM Queries
To instrument Django ORM queries, you need to install the associated DB instrumentation tool, then add the corresponding instrumentation command to your settings.py file. For example, if your app is using psycopg, you would do this.
uv add logfire[psycopg]
settings.py
logfire.instrument_psycopg("psycopg")
Agreed, happy for a PR about this.
Somewhat related is https://github.com/pydantic/logfire/issues/620
Also see https://github.com/open-telemetry/opentelemetry-python-contrib/issues/856