Skip to content

Commit

Permalink
Update SDK docs (#10720)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanie-anderson authored Jul 23, 2024
1 parent 1f40a8f commit a1ed83a
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 196 deletions.
3 changes: 1 addition & 2 deletions docs/platforms/dotnet/index.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
title: .NET
sdk: sentry.dotnet
description: Learn how to set up and run Sentry's .NET SDK, which will automatically report errors and exceptions in your application.
caseStyle: PascalCase
supportLevel: production
aliases:
- C#
---

On this page, we get you up and running with Sentry's .NET SDK, automatically reporting errors and exceptions in your application.

<Note>

If you don't already have an account and Sentry project established, head over to [sentry.io](https://sentry.io/signup/), then return to this page.
Expand Down
6 changes: 1 addition & 5 deletions docs/platforms/javascript/guides/node/index.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
title: Node.js
description: "Learn about using Sentry with Node.js."
description: "Learn how to set up Sentry in your Node.js application."
sdk: sentry.javascript.node
categories:
- server
---

<PlatformContent includePath="getting-started-primer" />

This guide explains how to set up Sentry in your Node.js application.

<PlatformContent includePath="alert-using-a-framework" noGuides />

<PlatformContent includePath="getting-started-node" />
11 changes: 5 additions & 6 deletions docs/platforms/php/guides/laravel/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ sidebar_order: 0
description: "Laravel is a PHP web application framework with expressive, elegant syntax. Learn how to set it up with Sentry."
---

Laravel is supported using a native package: [sentry-laravel](https://github.com/getsentry/sentry-laravel).
## Prerequisites

This guide is for Laravel 11.x. We also provide instructions for [other versions](/platforms/php/guides/laravel/other-versions/) as well as [Lumen-specific instructions](/platforms/php/guides/laravel/other-versions/lumen/).
* You need a [Sentry account](https://sentry.io/signup/) and project
* Your Laravel application needs to run on PHP 7.2 or later
* Your Laravel version needs to be 11.x or higher
* Read one of these guides if you use an [older version](/platforms/php/guides/laravel/other-versions/) or need [Lumen-specific instructions](/platforms/php/guides/laravel/other-versions/lumen/)

## Install

Expand Down Expand Up @@ -41,12 +44,8 @@ return Application::configure(basePath: dirname(__DIR__))
})->create();
```

<Note>

Alternatively, you can configure Sentry in your [Laravel Log Channel](usage/#log-channels), allowing you to log `info` and `debug` as well.

</Note>

## Configure

Configure the Sentry DSN with this command:
Expand Down
5 changes: 4 additions & 1 deletion docs/platforms/php/guides/symfony/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ sdk: sentry.php.symfony
description: "Symfony is a set of reusable PHP components and a PHP framework to build web applications and services. Learn how to set it up with Sentry."
---

Symfony is supported via the [`sentry-symfony`](https://github.com/getsentry/sentry-symfony) package as a native bundle.
## Prerequisites

* You need a [Sentry account](https://sentry.io/signup/) and project
* Your Symfony application needs to run on PHP 7.2 or later

## Install

Expand Down
24 changes: 11 additions & 13 deletions docs/platforms/php/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@ title: PHP
sdk: sentry.php
caseStyle: snake_case
supportLevel: production
description: PHP (or Hypertext Preprocessor) is an open source, general-purpose scripting language that's well-suited for web development. It can be embedded into HTML.
description: Learn how to set up Sentry in your PHP application.
---

On this page, we get you up and running with Sentry's PHP SDK, automatically reporting errors and exceptions in your application. The SDK provides support for PHP 7.2 or later. If you're using a previous version of the PHP SDK, you can access the <Link rel="nofollow" to="/platforms/php/legacy-sdk/">legacy SDK documentation</Link>.
## Prerequisites

<Note>
* You need a [Sentry account](https://sentry.io/signup/) and project
* Your application needs to run on PHP 7.2 or later
* Read one of these other guides if you use <PlatformLink to="/guides/laravel">Laravel</PlatformLink> or <PlatformLink to="/guides/symfony">Symfony</PlatformLink>

If you don't already have an account and Sentry project established, head over to [sentry.io](https://sentry.io/signup/), then return to this page.
## Features

</Note>

<GuideGrid platform="php" />

Sentry captures data by using an SDK within your application’s runtime. Our SDKs are platform-specific and allow Sentry to have a deep understanding of how your application works.

## Install
<p className="mb-5">Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.</p>

<OnboardingOptionButtons
options={[
Expand All @@ -28,15 +24,17 @@ Sentry captures data by using an SDK within your application’s runtime. Our SD
]}
/>

Install the SDK using [Composer](https://getcomposer.org/).
## Install

Install the Sentry SDK using [Composer](https://getcomposer.org/):

```bash
composer require sentry/sentry
```

<OnboardingOption optionId="profiling">

Install the Excimer extension via PECL:
To use Profiling, you'll also need to install the Excimer extension via PECL:

```bash
pecl install excimer
Expand Down
98 changes: 0 additions & 98 deletions docs/platforms/python/common/metrics/index.mdx

This file was deleted.

49 changes: 38 additions & 11 deletions docs/platforms/python/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,60 @@ sdk: sentry.python
showIntegrationsInSearch: true
---

On this page, we get you up and running with Sentry's SDK.
## Prerequisites

<Alert level="info" title="Using a framework?">
* You need a [Sentry account](https://sentry.io/signup/) and project
* Read one of our dedicated guides if you use any of the <PlatformLink to="/integrations/#web-frameworks">frameworks</PlatformLink> we support

See our <PlatformLink to="/integrations/">Integrations</PlatformLink> page or choose from the left-hand dropdown to get started.
## Features

</Alert>
<p className="mb-5">Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.</p>

Don't already have an account and Sentry project established? Head over to [sentry.io](https://sentry.io/signup/), then return to this page.

If you prefer to follow video instructions, see [How to Install the Sentry Python SDK in 60 Seconds](https://vimeo.com/899368672).
<OnboardingOptionButtons
options={[
'error-monitoring',
'performance',
'profiling',
]}
/>

## Install

Sentry captures data by using an SDK within your application’s runtime.
Install the Sentry SDK using [`pip`](https://pip.pypa.io/en/stable/):

<PlatformContent includePath="getting-started-install" />
```bash
pip install --upgrade sentry-sdk
```

## Configure

<PlatformContent includePath="getting-started-config" />
Configuration should happen as early as possible in your application's lifecycle.

<SignInNote />


```python {"onboardingOptions": {"performance": "5-7", "profiling": "8-11"}}
import sentry_sdk

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for tracing.
traces_sample_rate=1.0,
# Set profiles_sample_rate to 1.0 to profile 100%
# of sampled transactions.
# We recommend adjusting this value in production.
profiles_sample_rate=1.0,
)
```

## Verify

Add this intentional error to your application to test that everything is working right away.

<PlatformContent includePath="getting-started-verify" />
```py
division_by_zero = 1 / 0
```

<Note>

Expand Down
24 changes: 16 additions & 8 deletions docs/platforms/python/tracing/index.mdx
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
---
title: Set Up Tracing
description: "Learn how to enable tracing in your Python SDK and get valuable performance insights about your application."
description: "With Tracing, Sentry tracks your software performance, measuring metrics like throughput and latency, and displays the impact of errors across multiple systems."
sidebar_order: 4000
---

With [tracing](/product/performance/), Sentry tracks your software performance, measuring metrics like throughput and latency, and displaying the impact of errors across multiple systems. Sentry captures distributed traces consisting of transactions and spans, which measure individual services and individual operations within those services. Learn more about our model in [Distributed Tracing](/product/sentry-basics/tracing/distributed-tracing/).
## Prerequisites

<Note>
* You have the <PlatformLink to="/">Python SDK installed</PlatformLink> (version 0.11.2 or higher)

If you’re adopting Tracing in a high-throughput environment, we recommend testing prior to deployment to ensure that your service’s performance characteristics maintain expectations.
## Configure

</Note>
To enable tracing in your application, adjust the `traces_sample_rate` based on the number of trace samples you want to send to Sentry by adding the highlighted code snippet below. (Setting a value of `1.0` will send 100% of your traces.)

<Include name="opentelemetry-available.mdx" />
<SignInNote />

## Configure
```python {diff}
import sentry_sdk

<PlatformContent includePath="performance/configure-sample-rate" />
sentry_sdk.init(
dsn="___PUBLIC_DSN___",
+ # We recommend adjusting this value in production
+ traces_sample_rate=1.0,
)
```

If you’re adopting Tracing in a high-throughput environment, we recommend testing prior to deployment to ensure that your service’s performance characteristics maintain expectations.

Learn more about tracing <PlatformLink to="/configuration/options/#tracing-options">options</PlatformLink>, how to use the <PlatformLink to="/configuration/sampling/#setting-a-sampling-function">traces_sampler</PlatformLink> function, or how to <PlatformLink to="/configuration/sampling/#sampling-transaction-events">sample transactions</PlatformLink>.

Expand Down
26 changes: 0 additions & 26 deletions platform-includes/getting-started-config/python.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions platform-includes/getting-started-install/python.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions platform-includes/getting-started-verify/python.mdx

This file was deleted.

18 changes: 0 additions & 18 deletions platform-includes/performance/configure-sample-rate/python.mdx

This file was deleted.

Loading

0 comments on commit a1ed83a

Please sign in to comment.