Skip to content

Commit

Permalink
docs(python): Improve BottleIntegration options docs (#11512)
Browse files Browse the repository at this point in the history
* 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 <alexanderkrawiec@gmail.com>

---------

Co-authored-by: Alex Krawiec <alexanderkrawiec@gmail.com>
  • Loading branch information
szokeasaurusrex and coolguyzone authored Oct 14, 2024
1 parent 4da6d58 commit 0d92705
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/platforms/python/integrations/bottle/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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/<foo>")
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/<foo>` if you set `transaction_style="url"`.
- `myendpoint` if you set `transaction_style="endpoint"`
```python
@app.route("/myurl/<foo>")
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/<foo>"`, since that is the URL path.

## Supported Versions

Expand Down

0 comments on commit 0d92705

Please sign in to comment.