Skip to content

Commit

Permalink
edits on span/tracing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vivianyentran committed Jun 12, 2024
1 parent 616bab5 commit 81e2068
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 47 deletions.
14 changes: 8 additions & 6 deletions docs/concepts/key-terms/key-terms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,18 @@ Some of the bellow terms have corresponding features with the same name (in uppe

Each of these key features have their own page (or set of pages) in the [sentry.io](https://sentry.io) application.

- **Alerts** - Where you can create new alert rules and manage existing ones. Learn more in the full [Alerts documentation](/product/alerts/).
- **Issues** - Displays information about grouped problems in your application. From here, you can go to the **Issue Details** page for a more granular view of any issue. Learn more in the full [Issues documentation](/product/issues/).

- **Dashboards** - Provide you with a broad overview of your application’s health by allowing you to navigate through error and performance data across multiple projects. Dashboards are made up of one or more widgets, and each widget visualizes one or more **Discover** or **Issues** queries. Learn more in the full [Dashboards documentation](/product/dashboards/).
- **Projects** - Lists the projects of which you're a member, by team, and provides you with a high-level overview of your projects. From here, you can go to the **Project Details** page of each project for a more granular view. Learn more in the full [Projects documentation](/product/projects/).

- **Discover** - Allows you to query events across environments, providing you with visibility into your errors and transactions and unlocking insights into the health of your entire system. The **Discover** page visualizes the results of queries. Learn more in the full [Discover documentation](/product/explore/discover-queries/).
- **Explore** - Sentry offers multiple ways to search and investigate your application's data — including your app's traces, metrics, profiles, replays, and events — to get the information you need to debug issues more quickly and easily. Use the Discover page to query events across environments, visualize the results, and unlock insights into the health of your entire system. Learn more in the full [Explore documentation](/product/explore/).

- **Issues** - Displays information about grouped problems in your application. From here, you can go to the **Issue Details** page for a more granular view of any issue. Learn more in the full [Issues documentation](/product/issues/).
- **Insights** - Sentry surfaces insights that can help you identify opportunities at the service-level to improve various parts of your app's performance, including requests, assets, caches, queues, and more. Modules living under the Insights heading provide an overview of how your project is performing in that category, as well as the ability to review sample events and their traces to help you diagnose potential problems.

- **Performance** - The main view in [sentry.io](http://sentry.io) where you can search or browse for transaction data. The page displays graphs that visualize transactions or trends, as well as a table where you can view relevant transactions and drill down to more information about them. Learn more in the full [Tracing documentation](/product/performance/).
- **Performance** - The main view in [sentry.io](http://sentry.io) where you can search or browse for transaction data. The page displays graphs that visualize transactions or trends, as well as a table where you can view relevant transactions and drill down to more information about them. Learn more in the full [performance monitoring documentation](/product/performance/).

- **Projects** - Lists the projects of which you're a member, by team, and provides you with a high-level overview of your projects. From here, you can go to the **Project Details** page of each project for a more granular view. Learn more in the full [Projects documentation](/product/projects/).
- **Alerts** - Where you can create new alert rules and manage existing ones. Learn more in the full [Alerts documentation](/product/alerts/).

- **Dashboards** - Provide you with a broad overview of your application’s health by allowing you to navigate through error and performance data across multiple projects. Dashboards are made up of one or more widgets, and each widget visualizes one or more **Discover** or **Issues** queries. Learn more in the full [Dashboards documentation](/product/dashboards/).

- **Releases** - Provides a high-level view of each release version, the associated project, the adoption stage of each release, the authors of each commit, as well as release health data including the percentage of crash-free users, and the percentage of crash-free sessions. You can navigate directly to the **Releases** page or from the **Issue Details** page, by selecting release ID listed under "Last Seen". Learn more in the full [Releases documentation](/product/releases/).
2 changes: 1 addition & 1 deletion docs/platforms/android/tracing/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Set Up Tracing
description: "Learn how to enable tracing in your app and discover valuable performance insights of your application."
description: "Learn how to enable tracing in your app so you can get valuable performance insights about your application."
sidebar_order: 4000
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Custom Instrumentation
sidebar_order: 20
description: "Learn how to capture performance data on any action in your app."
description: "Learn how to enable trace and span data-capturing on any action in your app."
---

<Note>
Expand Down
2 changes: 1 addition & 1 deletion docs/platforms/dart/tracing/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Set Up Tracing
description: "Learn how to enable tracing in your app and discover valuable performance insights of your application."
description: "Learn how to enable tracing in your app and get valuable performance insights about your application."
sidebar_order: 4000
---

Expand Down
15 changes: 8 additions & 7 deletions docs/pricing/quotas/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ In some cases, repeated events can count against your quota, so it's important t

### Inbound Filters

If an inbound filter is applied for a type of error, transaction, or attachment, and your subscription allows, it won't be counted. You can manage these in **[Project] > Settings > Inbound Filters**. Learn more in [Manage Your Error Quota](/pricing/quotas/manage-event-stream-guide/#inbound-data-filters), [Manage Your Span Units Quota](/pricing/quotas/manage-transaction-quota/#inbound-filters), [Manage your Replay Quota](/pricing/quotas/manage-replay-quota/), and [Manage Your Attachments Quota](/pricing/quotas/manage-attachments-quota/#inbound-data-filters).
If an inbound filter is applied for a type of error, transaction/span, or attachment, and your subscription allows, it won't be counted. You can manage these in **[Project] > Settings > Inbound Filters**. Learn more in [Manage Your Error Quota](/pricing/quotas/manage-event-stream-guide/#inbound-data-filters), [Manage Your Span Units Quota](/pricing/quotas/manage-transaction-quota/#inbound-filters), [Manage your Replay Quota](/pricing/quotas/manage-replay-quota/), and [Manage Your Attachments Quota](/pricing/quotas/manage-attachments-quota/#inbound-data-filters).

### SDK Sample Rate

If a sample rate is defined for the SDK, the SDK evaluates whether this event should be sent as a representative fraction of events, effectively limiting the number of errors and transactions you send to Sentry. Setting a sample rate is documented [for each SDK](/platform-redirect/?next=/configuration/sampling/), but you can also learn more in [Manage Your Error Quota](/pricing/quotas/manage-event-stream-guide/#sdk-sample-rate) and [Manage Your Performance Units Quota](/pricing/quotas/manage-transaction-quota/#sdk-configuration-tracing-options/).
If a sample rate is defined for the SDK, the SDK evaluates whether this event should be sent as a representative fraction of events, effectively limiting the number of errors and transactions/spans you send to Sentry. Setting a sample rate is documented [for each SDK](/platform-redirect/?next=/configuration/sampling/), but you can also learn more in [Manage Your Error Quota](/pricing/quotas/manage-event-stream-guide/#sdk-sample-rate) and [Manage Your Span Units Quota](/pricing/quotas/manage-transaction-quota/#sdk-configuration-tracing-options/).

### SDK Filtering: `beforeSend` and `beforeSendTransaction`

Expand Down Expand Up @@ -114,21 +114,22 @@ Use this table as a quick reference for what does and doesn't count towards your
| The event isn't sent based on [SDK filters](#sdk-filtering-beforesend-and-beforesendtransaction) | |
| The event isn't sent based on [SDK configuration](#sdk-configuration) | |
| [Size limits](#size-limits) have been exceeded | |
| [Issues](/product/issues/) are created from accepted errors, transactions, and transactions with profiling | |

{/*<!-- prettier-ignore-end -->*/}

Sentry groups accepted errors and spans into issues. The issues themselves don't count towards your quota, but the errors and spans that comprise an issue are counted.

## Key Terms

Let's clarify a few terms:

- **Attachment** - Attachments are stored additional files, such as config files, log files, or stored mini-dumps, that are related to an error event. Unless the option to store crash reports is enabled, Sentry will use these files only to create an event, and then drop them.
- **Cron Monitor** - A Cron Monitor represents a set of configurations for a scheduled, recurring job such as a "Data Backup" job that runs daily on production and development.
- **Data** - Anything you send to Sentry. This includes events (errors, transactions, transactions with profiling, or replays), attachments, and event metadata.
- **Data** - Anything you send to Sentry. This includes events (errors, spans, or replays), attachments, and event metadata.
- **Error** - What counts as an error varies by platform, but in general, if there's something that looks like an exception, it can be captured as an error in Sentry. Sentry automatically captures errors, uncaught exceptions, and unhandled rejections, as well as other types of errors, depending on platform. A grouping of similar errors makes [an issue](/product/issues/).
- **Event** - An event is one instance of you sending data to Sentry, excluding attachments. Generally, this data is an error or a transaction.
- **Event** - An event is one instance of you sending data to Sentry, excluding attachments. Generally, this data is an error or a transaction/span.
- **Replay** - Session Replays are video-like reproductions of users' sessions as they navigate your app or website.
- **Span** - The basic unit that [traces](/concepts/key-terms/tracing/distributed-tracing/) are composed of. Multiple spans make up a trace in Sentry and share a trace_id.
- **Span Unit** - A billing unit in Sentry that maps to span usage.
**Profile** - A snapshot of your code's resource usage obtained by periodically capturing the call stack as your application runs.
- **Quota** - Your quota is the amount of data (errors, performance units, replays, attachments) that you pay Sentry to track.
- **Profile** - A snapshot of your code's resource usage obtained by periodically capturing the call stack as your application runs.
- **Quota** - Your quota is the amount of data (errors, span units, replays, attachments) that you pay Sentry to track.
35 changes: 7 additions & 28 deletions docs/pricing/quotas/manage-transaction-quota.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ keywords: ["best practices"]
sidebar_order: 40
description: "Learn how to use the tools Sentry provides to control your span unit quota."
---
In most cases, sending all span events to Sentry could generate more data than you'd find useful and might use up your span units too quickly. Sentry provides tools to control the _type_ and _amount_ of spans that are monitored. This allows you to have tracing data that's actionable and meaningful.

In most cases, sending all Transaction events to Sentry could generate more data than you'd find useful and might use up your span units too quickly. Sentry provides tools to control the _type_ and _amount_ of transactions that are monitored. This allows you to have tracing data that's actionable and meaningful.

Applying the proper SDK configuration is an iterative and on-going process, but these tips will show you how to best use Sentry's tools to get the most out of your transaction and transactions with profiling events. These tips are ordered from easiest or least time-consuming to most challenging or potentially time-consuming. The first two options are things you can do in [sentry.io](https://sentry.io), whereas the remaining ones are things you'll do in the SDK.
Applying the proper SDK configuration is an iterative and on-going process, but these tips will show you how to best use Sentry's tools to get the most out of your span units. These tips are ordered from easiest or least time-consuming to most challenging or potentially time-consuming. The first two options are things you can do in [sentry.io](https://sentry.io), whereas the remaining ones are things you'll do in the SDK.

## Before You Begin: Check Your Quota Usage

Expand All @@ -31,23 +30,9 @@ The [Usage Stats](/product/stats/#usage-stats) tab displays details about the to

The "Project" table in the "Usage Stats" tab of **Stats** breaks down your events by project so you can see which ones are consuming your quota. Clicking on the settings icon next to a project name in the table will open the project's settings, where you can manage its [inbound filters](#2-inbound-data-filters).

### Which transactions are consuming my quota?

<Note>

You can only update the columns of the Results table in **Discover** if your organization is on a Business plan.

</Note>

You can set up [a query](<https://sentry.io/orgredirect/organizations/:orgslug/discover/results/?field=title&field=project&field=count()&name=All+Events&query=event.type%3Atransaction&sort=-count&statsPeriod=14d&yAxis=count()>) in **Discover** to see which transactions or transactions with profiling you're receiving the most and if you want to adjust that. When you're building the query, search for `event.type:transaction` and then set the columns to `title`, `project`, and `count`, as shown below:

![Busiest Projects](./img/manage-trans-quota-01.png)
### What should my sample rate be?

Once the changes are applied, sort the "Results" table by the "COUNT()" column to display your busiest transactions:

![Busiest Issues](./img/manage-trans-quota-02.png)

You can look for transactions with profiling using  `has:profile.id`. Adding a `profile.id` column to the query will give you a link to the profile.
Sentry SDKs allow you to configure a [sample rate](/platform-redirect/?next=/configuration/sampling/). The "Project" table in the "Usage Stats" tab of Stats can also help you make decisions about the sample rate that's most relevant for your usage.

## Adjusting Quotas

Expand All @@ -57,7 +42,7 @@ Quotas can only be updated by a Billing or Owner member of your Sentry organizat

</Note>

Once your span units volume is approaching or has exceeded the quota, teammates with the "Owner" organization permission level will receive [notification](/product/alerts/notifications/#quota-notifications) emails. You can then choose to [increase](#increasing-quotas) or [decrease](#decreasing-quotas) your quota.
Once your span unit volume is approaching or has exceeded the quota, teammates with the "Owner" organization permission level will receive [notification](/product/alerts/notifications/#quota-notifications) emails. You can then choose to [increase](#increasing-quotas) or [decrease](#decreasing-quotas) your quota.


### Increasing Quotas
Expand Down Expand Up @@ -115,12 +100,6 @@ Once applied, you can track the filtered events (numbers and cause) using the gr

![Built-in Inbound Filters](./img/manage-event-stream-03.png)

<Note>

The **Inbound Data Filters** page in [sentry.io](https://sentry.io) only refers to errors, but it applies to transactions, transactions with profiling, and attachments as well.

</Note>

Sentry provides several methods to filter all events and attachments server-side, which are applied before checking for potential rate limits. Inbound filters include:

- Common browser extension errors
Expand All @@ -146,8 +125,8 @@ If you discover a problematic release causing excessive noise, Sentry supports i

## SDK Filtering: beforeSendTransaction

Some Sentry SDKs support the `beforeSendTransaction` callback method. Once implemented, this method is invoked when the SDK captures a transaction event, right before sending it to your Sentry account. Because it receives the transaction event object as a parameter, you can use it to modify the event's data or drop the event completely (by returning `null`) based on your custom logic and the data available on the event, such as _tags_, _environment_, _release version_, _transaction name_, and so on. Note that only transaction events pass through `beforeSendTransaction`. Error and message events have a separate method, `beforeSend`, which is supported in all SDKs. Learn more about both methods in [Filtering Events](/platform-redirect/?next=/configuration/filtering/).
Sentry SDKs send transactions, each of which contain an arbitrary number of spans. Some Sentry SDKs support the `beforeSendTransaction` callback method. Once implemented, this method is invoked when the SDK captures a transaction event, right before sending it to your Sentry account. Because it receives the transaction event object as a parameter, you can use it to modify the event's data or drop the event completely (by returning `null`) based on your custom logic and the data available on the event, such as _tags_, _environment_, _release version_, _transaction name_, and so on. Note that only transaction events pass through `beforeSendTransaction`. Error and message events have a separate method, `beforeSend`, which is supported in all SDKs. Learn more about both methods in [Filtering Events](/platform-redirect/?next=/configuration/filtering/).

## SDK Configuration: Tracing Options

When you configure your SDK, you can control the number of transactions that are sent to Sentry by setting the [tracing options](/platform-redirect/?next=/configuration/options/%23tracing-options), including either setting a sample rate or providing a function for sampling. You can also set up [custom instrumentation](/platform-redirect/?next=/performance/instrumentation/custom-instrumentation/) for tracing to capture certain types of transactions.
When you configure your SDK, you can control the number of transactions and therefore, the number of spansthat are sent to Sentry by setting the [tracing options](/platform-redirect/?next=/configuration/options/%23tracing-options), including either setting a sample rate or providing a function for sampling. You can also set up [custom instrumentation](/platform-redirect/?next=/performance/instrumentation/custom-instrumentation/) for tracing to capture certain types of transactions.
Loading

0 comments on commit 81e2068

Please sign in to comment.