---
title: "Automatic Instrumentation"
description: "Learn what instrumentation automatically captures spans."
url: https://docs.sentry.io/platforms/python/tracing/instrumentation/automatic-instrumentation/
---

# Automatic Instrumentation for Python

Many integrations for popular frameworks automatically capture service spans (transactions in SDK versions prior to `3.0`). If you already have any of the following frameworks set up for Sentry error reporting, you will start to see traces immediately:

* All WSGI-based web frameworks (Django, Flask, Pyramid, Falcon, Bottle)
* Celery
* AIOHTTP web apps
* Redis Queue (RQ)

See the full [list of available integrations](https://docs.sentry.io/platforms/python/integrations.md).

Spans are instrumented for the following operations within a service span:

* Database queries that use SQLAlchemy or the Django ORM
* HTTP requests made with HTTPX, requests, the stdlib, AIOHTTP, or pyreqwest
* Spawned subprocesses
* Redis operations

Most of these integrations, such as the HTTP client, subprocess, and Redis integrations, only create spans while another span is active. If you're not using any of the supported frameworks, start a span around your code manually. Any span started without a parent is automatically promoted to a service span, and you can force a span to become a service span by setting its parent to `None`. See [Custom Instrumentation](https://docs.sentry.io/platforms/python/tracing/instrumentation/custom-instrumentation.md) to learn more.

In SDK versions prior to `3.0`, in the default transaction mode, spans are only created within an existing transaction, so you'll need to [create transactions manually](https://docs.sentry.io/platforms/python/tracing/instrumentation/custom-instrumentation.md).
