Skip to content

Commit 1efe91f

Browse files
antonpirkershanamatthewsgetsantry[bot]
authored
Fixed Python AIOHTTP documentation (#7498)
* Fixed documentation * Update src/platforms/python/guides/aiohttp/index.mdx * style(lint): Auto commit lint changes * Update src/platforms/python/guides/aiohttp/index.mdx * Update src/platforms/python/guides/aiohttp/index.mdx --------- Co-authored-by: Shana Matthews <shana.l.matthews@gmail.com> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent 368f0ba commit 1efe91f

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

src/platforms/python/guides/aiohttp/index.mdx

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,30 @@ web.run_app(app)
7676

7777
You can pass the following keyword arguments to `AioHttpIntegration()`:
7878

79-
- `transaction_style`:
79+
```python
80+
import sentry_sdk
81+
from sentry_sdk.integrations.aiohttp import AioHttpIntegration
82+
83+
sentry_sdk.init(
84+
dsn="___PUBLIC_DSN___",
85+
integrations=[
86+
AioHttpIntegration(
87+
transaction_style="method_and_path_pattern",
88+
),
89+
],
90+
)
91+
```
8092

81-
```python
82-
app.router.add_get(r'/path/{id}', hello)
83-
```
93+
### `transaction_style`
8494

85-
For transactions generated by the above code, you can set the transaction name to:
95+
Configure the way Sentry names transactions:
8696

87-
- `GET /path/{id}` if you set `transaction_style="method_and_path_pattern"`
88-
- `<module_name>.hello` if you set `transaction_style="handler_name"`
97+
- `GET /path/{id}` if you set `transaction_style="method_and_path_pattern"`
98+
- `<module_name>.hello` if you set `transaction_style="handler_name"`
8999

90-
The default is `"handler_name"`.
100+
The default is `"handler_name"`.
91101

92-
- `capture_graphql_errors`:
102+
### `capture_graphql_errors`
93103

94104
If enabled, the SDK will automatically create an error event whenever the response
95105
to a request to an endpoint called `/graphql` contains an `errors` array. The

0 commit comments

Comments
 (0)