Skip to content

Commit

Permalink
Merge branch 'master' into antonis/react-native-capture-feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
antonis committed Dec 17, 2024
2 parents 8d3f80a + cfaa5c0 commit b787285
Show file tree
Hide file tree
Showing 24 changed files with 592 additions and 18 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ We use Next.js, `yarn` and `volta` to manage the environment.
```
cp .env.example .env.development
yarn
# Start dev server for user docs
yarn dev
# Start dev server for developer docs
yarn dev:developer-docs
```

With that, the repo is fully set up and you are ready to open local docs under http://localhost:3000
Expand Down
8 changes: 8 additions & 0 deletions develop-docs/ingestion/snuba/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Snuba
description: A service that provides a rich data model on top of Clickhouse together with a fast ingestion consumer and a query optimizer.
---

Repository: https://github.com/getsentry/snuba

Documentation: https://getsentry.github.io/snuba/
8 changes: 8 additions & 0 deletions develop-docs/ingestion/symbolic/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Symbolic
description: A library written in Rust for symbolication of native stack traces and more.
---

Repository: https://github.com/getsentry/symbolic

Documentation: https://docs.rs/symbolic/latest/symbolic/
232 changes: 232 additions & 0 deletions develop-docs/ingestion/symbolicator/index.mdx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/concepts/search/saved-searches.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Learn more about default, recommended, and saved searches."
---

<Alert>
Saved Searches has been deprecated and will be removed at the end of the year. Your saved searches will still be available in the "Add View" menu on the **Issues** page. Any saved search can be converted to an Issue View.
Saved Searches has been deprecated and will be removed soon. Your saved searches will still be available in the "Add View" menu on the **Issues** page. Any saved search can be converted to an Issue View.
</Alert>

Sentry allows you to save searches you've made on the **Issues** page. At the top of the page, next to the search bar, click "Custom Search" to access the "Saved Searches" sidebar.
Expand Down
8 changes: 5 additions & 3 deletions docs/platforms/android/overhead/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: SDK Overhead
description: "Learn about Sentry's Android SDK overhead."
description: "Learn about Sentry's Android SDK overhead and how you can tailor your configuration to minimize it."
sidebar_order: 7500
---

Expand All @@ -10,7 +10,7 @@ Adding new features or dependencies to your app incurs additional costs on resou

The SDK is designed to have minimal to no impact on user experience. To achieve this, we utilize an array of tools to continuously measure and optimize the performance of our implementations.

We also employ various techniques to ensure we don't add strain on the system's resources along the hot path - on Mobile, this very often means that we offload processing steps, I/O, and other things to a background thread, or we postpone processing to a later time if possible.
We also employ various techniques to ensure we don't add strain on the system's resources along the hot path. On Mobile, this very often means that we offload processing steps, I/O, and other things to a background thread, or we postpone processing to a later time if possible.

If you find (for example via local Profiling, or using Sentry to improve the performance of your app) that the SDK does not operate within the guidelines mentioned below, please [open an issue](https://github.com/getsentry/sentry-java/issues/new/choose) on our SDK repo and make sure you provide as much context as you can.

Expand All @@ -22,7 +22,7 @@ The SDK also provides methods to manually capture events: <PlatformLink to="/usa

## Screenshots and View Hierarchy

If you activate these features, the SDK will capture <PlatformLink to="/enriching-events/screenshots">Screenshots</PlatformLink> and <PlatformLink to="/enriching-events/viewhierarchy">View Hierarchy</PlatformLink> of the app's UI at the time of the error crash. This incurs a small overhead that is unnoticeable during normal operation.
If you activate these features, the SDK will capture <PlatformLink to="/enriching-events/screenshots">Screenshots</PlatformLink> and <PlatformLink to="/enriching-events/viewhierarchy">View Hierarchy</PlatformLink> of the app's UI at the time of an error or crash. This incurs a small overhead that is unnoticeable during normal operation.

If your app raises many errors in a tight loop, it can become too much to process quickly enough, and UI jank can be the result, so make sure you handle such cases appropriately. The SDK provides callbacks to fine-tune when to capture <PlatformLink to="/enriching-events/screenshots#customize-screenshot-capturing">Screenshots</PlatformLink> and <PlatformLink to="/enriching-events/viewhierarchy#customize-view-hierarchy-capturing">View Hierarchy</PlatformLink>, which can also be used to reduce performance impact in scenarios where you don't need screenshots or view hierarchies.

Expand All @@ -45,3 +45,5 @@ As stated in our <Link to="/product/explore/profiling/performance-overhead">prod
## Session Replay

As stated in our <Link to="/product/explore/session-replay/mobile/performance-overhead">product docs on the topic</Link>, Session Replay adds some overhead, but should have minimal impact on the performance of your application. For more details on the measured overhead, read the <PlatformLink to="/session-replay/performance-overhead/">performance overhead docs for this SDK</PlatformLink>.

Note that this feature is still under development and we're working on optimizing performance.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Custom Instrumentation
description: "Learn how to capture performance data on any action in your app."
---

The Sentry SDK for Python does a very good job of auto instrumenting your application. If you use one of the popular frameworks, we've got you covered because everything is instrumented out of the box. The Sentry SDK will check your installed Python packages and auto enable the matching SDK integrations.
The Sentry SDK for Python does a very good job of auto instrumenting your application. If you use one of the popular frameworks, we've got you covered because well-known operations like HTTP calls and database queries will be instrumented out of the box. The Sentry SDK will also check your installed Python packages and auto enable the matching SDK integrations. If you want to enable tracing in a piece of code that performs some other operations, add the @sentry_sdk.trace decorator"

## Add a Transaction

Expand Down Expand Up @@ -98,6 +98,7 @@ def eat_pizza(pizza):
eat_slice(pizza.slices.pop())
span.finish()
```

<Alert title="Changed in 2.15.0" level="info">

The parameter `name` in `start_span()` used to be called `description`. In version 2.15.0 `description` was deprecated and from 2.15.0 on, only `name` should be used. `description` will be removed in `3.0.0`.
Expand Down Expand Up @@ -130,7 +131,6 @@ The parameter `name` in `start_span()` used to be called `description`. In versi

</Alert>


### Using a Decorator

```python
Expand Down Expand Up @@ -177,7 +177,6 @@ When you create your span manually, make sure to call `span.finish()` after the

To avoid having custom performance instrumentation code scattered all over your code base, pass a parameter <PlatformIdentifier name="functions-to-trace" /> to your `sentry_sdk.init()` call.


```python
import sentry_sdk

Expand Down
1 change: 1 addition & 0 deletions docs/product/alerts/create-alerts/uptime-alert-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Configure how Sentry should execute an HTTP uptime check, by specifying:
- **Method**: The request method used to execute the uptime check. Available options are `GET`, `POST`, `HEAD`, `PUT`, `DELETE`, `PATCH`, and `OPTIONS`.
- **Headers**: The request headers included in the uptime check request.
- **Body**: The body message to include in the uptime check request. (This is only available when the method is set to `POST`, `PUT`, and `PATCH`.)
- **Allow Sampling**: Enable "Allow Sampling" to let the Sentry SDK handle span sampling for requests. See the [distributed tracing with uptime](/product/alerts/uptime-monitoring/uptime-tracing/) docs for more detail.

Make sure to include a `Content-Type` header in your headers configuration in case the specified URL requires it. For example, a JSON message body would have a `Content-Type` header of `application/json`.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/product/alerts/uptime-monitoring/troubleshooting.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Troubleshooting
sidebar_order: 52
sidebar_order: 53
description: "Learn how to troubleshoot potential Uptime Monitoring problems."
---

Expand Down
97 changes: 97 additions & 0 deletions docs/product/alerts/uptime-monitoring/uptime-tracing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Distributed Tracing with Uptime
sidebar_order: 52
description: "Learn how to use distributed tracing to troubleshoot downtime."
---

Sentry's Uptime Monitoring uses [distributed tracing](/product/tracing/#whats-distributed-tracing) to track the flow and timing of requests and operations during uptime checks. This helps you quickly find the root cause of downtime by connecting related errors and performance data.

You can trace errors to identify and diagnose issues like crashes or exceptions. This is automatically enabled for all Uptime Alerts. You can also trace spans to monitor the performance and flow of operations, such as API calls or database queries. Span tracing is disabled by default, but can be enabled by allowing sampling in your Uptime Alert settings. Errors focus on problems, while spans focus on performance.

## How Uptime Tracing Works

Sentry Uptime Tracing automatically appends a `sentry-trace` header to every outgoing request made to the configured URL in your Uptime Alert settings. This header propagates a trace identifier.

If one of Sentry's supported backend SDKs is configured for the application handling the incoming uptime check request, the trace will continue through your application. Learn more about [how distributed tracing works](/product/tracing/).

Example Uptime check request:

```HTTP
GET /example-uptime-endpoint HTTP/1.1
Host: sentry.io
User-Agent: SentryUptimeBot/1.0 (+http://docs.sentry.io/product/alerts/uptime-monitoring/)
Sentry-Trace: 32d4011600324838afcd666edadc1d09-8d5ca7419a02ca36
```

## Tracing Errors

Error tracing is enabled by default for uptime checks. When downtime is detected, an [Uptime Issue](/product/issues/issue-details/uptime-issues/) is created. You can then go to Sentry's [**Trace Explorer**](/product/explore/traces/) page to view any related errors.

Because uptime requests won't override your SDK’s error sampling rate, some errors may not appear in traces if that rate is set to below 1.

### Disabling Uptime Error Tracing

To disable error tracing for uptime checks, configure a [before send](/platform-redirect/?next=/configuration/filtering/) filter in your SDK to ignore errors from Sentry's `User-Agent`. Here's an example:

```typescript {tabTitle: Node.js Express} {filename: instrument.mjs}
import * as Sentry from "@sentry/node";

Sentry.init({
dsn: "___PUBLIC_DSN___",
// Filtering example for a Node.js Express app
beforeSend(event) {
const userAgent = event.request?.headers?.["user-agent"];

// Ignore events captured in a request from SentryUptimeBot
if (userAgent && userAgent.includes("SentryUptimeBot")) {
return null;
}

// Process other events
return event;
},
});
```
## Tracing Spans
Unlike error tracing, span tracing is **disabled** by default for uptime checks, but can be enabled by allowing sampling in your Uptime Alert settings. Enabling span tracing can be helpful because it provides a detailed view of the timing and flow of requests and operations during uptime checks, which is especially useful for diagnosing timeouts or performance issues.
### Enabling Uptime Tracing for Spans
To enable span tracing, modify your Uptime Alert settings with the "Allow Sampling" option. This will ensure that Sentry defers the sampling decision to your SDK, which will follow the trace sample rate you've configured.
Because uptime requests won't override your SDK’s error sampling rate, some errors may not appear in traces if that rate is set to below 1.
![Uptime Alert Allow Sampling Configuration](./img/uptime-allow-sampling.png)
### Custom Sampling
To ensure that all spans from uptime checks are sampled, even if your SDK's trace sampling rate is below 1, you can configure a [sampling function](/platform-redirect/?next=/configuration/sampling/). Here's an example:
```typescript {tabTitle: Node.js Express} {filename: instrument.mjs}
import * as Sentry from "@sentry/node";

Sentry.init({
dsn: "___PUBLIC_DSN___",
// Custom tracer function for a Node.js Express app
tracesSampler: ({ name, attributes, parentSampled }) => {
const userAgent = attributes?.["http.user_agent"];

if (
typeof userAgent === "string" &&
userAgent.includes("SentryUptimeBot")
) {
// Sample 100% of spans from SentryUptimeBot
return 1;
}

// Sample 50% of other spans
return 0.5;
},
});
```
## Billing Considerations
Errors and spans captured during uptime checks are [billed as regular events](https://sentry.io/pricing/) in Sentry. Configure sampling thoughtfully to manage costs.
Binary file added docs/product/dev-toolbar/img/configure-domain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/product/dev-toolbar/img/feedback-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/product/dev-toolbar/img/issues-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/product/dev-toolbar/img/login-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/product/dev-toolbar/img/login-popup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions docs/product/dev-toolbar/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Dev Toolbar
sidebar_order: 120
description: "Bring critical Sentry insights and tools directly into your web app for easier troubleshooting with the Dev Toolbar."
---

<Alert level="info">
The Dev Toolbar is currently in **beta**. Beta features are still in progress and may have bugs. Please reach out on
[GitHub](https://github.com/getsentry/sentry-toolbar/issues) if you have any feedback or concerns.
</Alert>

Developers spend a lot of time troubleshooting their web apps on local, staging, and production environments. The Sentry Dev Toolbar pulls data from [sentry.io](http://sentry.io) and surfaces relevant, actionable issues to you when you have the most context for understanding it: as you browse your own site. The Dev Toolbar is a floating widget in your web app, offering meaningful Sentry insights for the specific page being viewed through three different **page-aware** panels: Issues, Feedback, and Feature Flags.

![Collapsed Dev Toolbar in context of a website](./img/toolbar-collapsed.png)

## Issues Panel

The issues panel shows you your highest priority frontend [issues](https://docs.sentry.io/product/issues/) for the page you are currently viewing. From the Dev Toolbar, you can quickly jump into specific issues in Sentry to get more detailed information (examples: Sentry project, issue title, description, and when the issue was first and last seen) and take action (examples: assign to a team member or mark as resolved). With the issues panel, you can browse the pages that are most important to your business and understand the top issues impacting your user base.

![Dev Toolbar with the Issues Panel open](./img/issues-panel.png)

## Feedback Panel

The feedback panel shows you the most recent user feedback messages for the page you are on, so you can more easily contextualize it. The feedback often describes suboptimal experiences that are not strictly code-thrown errors, such as misleading UX, broken links, and typos. The feedback panel works by pulling feedback messages from [Sentry’s User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget). Just like with the Issues panel, clicking on a particular user feedback will take you to the full detailed User Feedback page within Sentry.

![Dev Toolbar with the Feedback Panel open](./img/feedback-panel.png)

## Feature Flags Panel

Feature flags are a powerful tool that allow you to control the visibility of features in your app, enabling you to ship, test, and experiment with confidence. The feature flag panel allows you to quickly view and override feature flags locally. You can override any feature flag to be `true` or `false` for your browser session, so you can verify its behavior and observe the impact it might have on errors. Learn more about how to [configure the feature flag panel](/product/dev-toolbar/setup/#implement-feature-flag-adapter) and [what data Sentry can track](/product/explore/feature-flags/) related to your feature flagging system.


![Dev Toolbar with the Feature Flags Panel open](./img/feature-flags-panel.png)

## Login Flow

After setting up the Dev Toolbar you’ll see a “Login to Sentry” button floating in the center of the page. To access any information from your Sentry organization, you have to click this button and login to Sentry.
![Dev Toolbar login button](./img/login-button.png)

After clicking the button, you will see a pop-up window for logging in to Sentry.
![Sentry log in pop up](./img/login-popup.png)

If it's your first time setting up the Dev Toolbar, there will be a button with a link to Sentry's Dev Toolbar settings page to configure your domain.
![Dev Toolbar configure domains button](./img/configure-domain.png)

You'll need to add your domain URL to Allowed Origins in Sentry on the **Settings > Project > Dev Toolbar** page.
![Sentry's Dev Toolbar Settings Page](./img/sentry-toolbar-settings.png)

Learn more about setting up the toolbar, including configuring a feature flag provider and integrating the toolbar in different environments, on the next page.
Loading

0 comments on commit b787285

Please sign in to comment.