File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed
src/platforms/python/guides/aiohttp Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -76,20 +76,30 @@ web.run_app(app)
76
76
77
77
You can pass the following keyword arguments to ` AioHttpIntegration() ` :
78
78
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
+ ```
80
92
81
- ``` python
82
- app.router.add_get(r ' /path/{id}' , hello)
83
- ```
93
+ ### ` transaction_style `
84
94
85
- For transactions generated by the above code, you can set the transaction name to :
95
+ Configure the way Sentry names transactions :
86
96
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" `
89
99
90
- The default is ` "handler_name" ` .
100
+ The default is ` "handler_name" ` .
91
101
92
- - ` capture_graphql_errors ` :
102
+ ### ` capture_graphql_errors `
93
103
94
104
If enabled, the SDK will automatically create an error event whenever the response
95
105
to a request to an endpoint called ` /graphql ` contains an ` errors ` array. The
You can’t perform that action at this time.
0 commit comments