From 0d927053b55d783c6d098b8ae9b15aa5a4a08ab5 Mon Sep 17 00:00:00 2001 From: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:30:26 +0200 Subject: [PATCH] docs(python): Improve `BottleIntegration` options docs (#11512) * docs(python): Improve `BottleIntegration` options docs Specifically, convert the bulleted list to subheadings, and make the wording more specific and clearer. * Apply suggestions from code review Co-authored-by: Alex Krawiec --------- Co-authored-by: Alex Krawiec --- .../python/integrations/bottle/index.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/platforms/python/integrations/bottle/index.mdx b/docs/platforms/python/integrations/bottle/index.mdx index f419b71bdb3d8..70234c8e75af2 100644 --- a/docs/platforms/python/integrations/bottle/index.mdx +++ b/docs/platforms/python/integrations/bottle/index.mdx @@ -73,22 +73,22 @@ sentry_sdk.init( ``` -You can pass the following keyword arguments to `BottleIntegration()`: +Each of the following options are supported as keyword arguments to `BottleIntegration()`. -- `transaction_style`: +### `transaction_style` - ```python - @app.route("/myurl/") - def myendpoint(): - return "ok" - ``` +The `transaction_style` option specifies how the transaction name is generated. You can set the option to `"endpoint"` (the default) or `"url"`. - In the above code, you would set the transaction to: +For example, given the following route: - - `/myurl/` if you set `transaction_style="url"`. - - `myendpoint` if you set `transaction_style="endpoint"` +```python +@app.route("/myurl/") +def myendpoint(): + return "ok" +``` - The default is `"endpoint"`. +- If you set `transaction_style="endpoint"`, the transaction name will be `"myendpoint"`, since that is the route handler function's name. +- If you set `transaction_style="url"`, the transaction name will be `"/myurl/"`, since that is the URL path. ## Supported Versions