From 87d4fd6b3b8ca9e2f2fa8e1905a6cda8d6ce308a Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Mon, 29 Jul 2024 11:02:53 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Liza Mock --- .../integrate-backend/capturing-errors.mdx | 6 +++--- .../integrate-backend/configuration-options.mdx | 4 ++-- .../integrate-backend/getting-started.mdx | 14 ++++++++------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/product/sentry-basics/integrate-backend/capturing-errors.mdx b/docs/product/sentry-basics/integrate-backend/capturing-errors.mdx index 46b8a837ca762..e717110eb50d6 100644 --- a/docs/product/sentry-basics/integrate-backend/capturing-errors.mdx +++ b/docs/product/sentry-basics/integrate-backend/capturing-errors.mdx @@ -22,7 +22,7 @@ To trigger an unhandled error: 2. Point your browser to `http://localhost:8000/unhandled`. -2. If you've set up an alert rule, you should be notified about the error. Otherwise, open the **Issues** page in your Sentry account. +2. If you've set up an [alert rule](/product/alerts/create-alerts/), you should be notified about the error. Otherwise, open the [**Issues**](https://sentry.io/orgredirect/organizations/:orgslug/issues/) page in your Sentry account. 3. You should see the unhandled exception in the list of issues. @@ -91,8 +91,8 @@ Typically, `capture_message` is not emitted, but there are times when a develope 3. To try it out on your localhost, trigger the following endpoint: `http://localhost:8000/message`. 4. As before, open the new issue’s detail page from the **Issues** page. - - **Note:** You need to remove the `"issue.priority is high or medium"` filter from issue's page "Custom Search" field to see the messages in the issues list. + +You'll need to remove the `"issue.priority is high or medium"` filter from the "Custom Search" field on the [**Issues**](https://sentry.io/orgredirect/organizations/:orgslug/issues/) page to see all the issue types in the list. diff --git a/docs/product/sentry-basics/integrate-backend/configuration-options.mdx b/docs/product/sentry-basics/integrate-backend/configuration-options.mdx index 7e56c23a77a23..afef57f4fce8a 100644 --- a/docs/product/sentry-basics/integrate-backend/configuration-options.mdx +++ b/docs/product/sentry-basics/integrate-backend/configuration-options.mdx @@ -57,13 +57,13 @@ To add breadcrumbs to our app: 1. Open the file `myapp > view.py`. -2. Notice that we import `sentry_sdk` lib which contains the `add_breadcrumb` method: +2. Notice that we import the `sentry_sdk` lib, which contains the `add_breadcrumb` method: ```python {filename: myapp/views.py} import sentry_sdk ``` -3. We create a custom breadcrumb for each method handler in the view classes. This breadcrumb will be added to the trail of breadcrumbs associated with any error triggered through these method call flows. For instance, under `HandledErrorView.get`: +3. We then create a custom breadcrumb for each method-handler in the view classes. This breadcrumb gets added to the trail of breadcrumbs associated with any error triggered through these method call flows. For instance, under `HandledErrorView.get`: ```python {filename: myapp/views.py} sentry_sdk.add_breadcrumb( diff --git a/docs/product/sentry-basics/integrate-backend/getting-started.mdx b/docs/product/sentry-basics/integrate-backend/getting-started.mdx index eb43b46a811ed..22f9f47679635 100644 --- a/docs/product/sentry-basics/integrate-backend/getting-started.mdx +++ b/docs/product/sentry-basics/integrate-backend/getting-started.mdx @@ -79,9 +79,8 @@ Sentry captures data by using a platform-specific SDK within your application ru 1. Install the `sentry-sdk` by defining the dependency in the `requirements.txt` file. The SDK documentation and release information are available in the [Sentry SDK](https://github.com/getsentry/sentry-python) GitHub repository. -2. Open the `settings.py` file (located under `./backend-monitoring/myproject/settings.py`). This is where we initialize and configure the Sentry SDK in our application. +2. Open the `settings.py` file (located under `./backend-monitoring/myproject/settings.py`). This is where we import, initialize, and configure the Sentry SDK in our application. -3. In `settings.py` we import and initialize the Sentry SDK. ```python {filename: myproject/settings.py} import sentry_sdk @@ -130,14 +129,17 @@ To build and run the demo application on your localhost: 7. Follow the `deploy` target execution flow. - Notice that in addition to installing Python requirements and running the server, we also use the `sentry-cli` to create a new Sentry release, and associate commits to that release. Sentry will lookup through those commits when suggesting a suspect commit for your project issues. - Commands mentioned within the `Makefile` will be explained in detail in the next part of the tutorial, [Configuration Options](/product/sentry-basics/integrate-backend/configuration-options/). +Commands mentioned within the `Makefile` will be explained in detail in the next part of the tutorial, [Configuration Options](/product/sentry-basics/integrate-backend/configuration-options/). -8. To execute the `sentry-cli` commands, follow the instructions described [here](/product/sentry-basics/integrate-frontend/upload-source-maps/#step-1-prepare-the-build-environment) to obtain the values for your `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, and `SENTRY_PROJECT` environment variables. + +In addition to installing Python requirements and running the server, we also use the `sentry-cli` to create a new Sentry release and associate commits to that release. Sentry will look through these commits when flagging a suspect commit. + + +8. To execute the `sentry-cli` commands, follow these [instructions](/product/sentry-basics/integrate-frontend/upload-source-maps/#step-1-prepare-the-build-environment) to obtain the values for your `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, and `SENTRY_PROJECT` environment variables. ![Makefile Config](./img/makefile_config.png) - > The `sentry-cli` can be configured by providing these values either through environment variables or through a dedicated configuration file. Learn more in [Sentry CLI > Configuration and Authentication](/product/cli/configuration/). + > The `sentry-cli` can be configured by providing these values either through environment variables or through a dedicated configuration file. Learn more in [Sentry CLI: Configuration and Authentication](/product/cli/configuration/). 9. Run the following command to install the required Python libraries, set up the Sentry Release, and run the Django server: