Skip to content

Commit ef7c9b6

Browse files
committed
feat(python): Document default span attributes
1 parent 7e0635b commit ef7c9b6

File tree

1 file changed

+15
-0
lines changed
  • docs/platforms/python/integrations/aiohttp

1 file changed

+15
-0
lines changed

docs/platforms/python/integrations/aiohttp/index.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,21 @@ It takes a couple of moments for the data to appear in [sentry.io](https://sentr
6262
- _The AIOHTTP integration currently does not attach the request body_, see [GitHub issue](https://github.com/getsentry/sentry-python/issues/220).
6363
- Logging with any logger will create breadcrumbs when the [Logging](/platforms/python/integrations/logging/) integration is enabled (done by default).
6464

65+
### Tracing
66+
67+
A set of predefined span attributes will be attached to AIOHTTP transactions by default. These can also be used for sampling since they will also be accessible via the `sampling_context` dictionary in the [`traces_sampler`](/platforms/python/configuration/options/#traces_sampler).
68+
69+
- `url.path`
70+
- `url.query`
71+
- `url.scheme`
72+
- `url.full`
73+
- `http.request.method`
74+
- `http.request.header.{header}`
75+
- `server.address`
76+
- `server.port`
77+
78+
These attributes will also be sent to Sentry. If you don't want that, you can filter them out using a custom [`traces_sampler`](/platforms/python/configuration/options/#before_send) function.
79+
6580
## Options
6681

6782
By adding `AioHttpIntegration` to your `sentry_sdk.init()` call explicitly, you can set options for `AioHttpIntegration` to change its behavior:

0 commit comments

Comments
 (0)