Skip to content

Commit 9370ee4

Browse files
Merge branch 'master' into feat/develop-docs-sdk-debug-mode
2 parents 2c61a33 + 4cbd202 commit 9370ee4

File tree

42 files changed

+345
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+345
-39
lines changed

.github/workflows/lint-404s.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- 'platform-includes/**'
2626
dev-docs:
2727
- 'develop-docs/**'
28-
- uses: oven-sh/setup-bun@v1
28+
- uses: oven-sh/setup-bun@v2
2929
with:
3030
bun-version: latest
3131

develop-docs/engineering-practices/rust.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_order: 40
77
## Getting Started
88

99
- A quick introduction into the Syntax for first-timers:
10-
[A half-hour to learn Rust](https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/)
10+
[A half-hour to learn Rust](https://fasterthanli.me/articles/a-half-hour-to-learn-rust)
1111
- The Rust Book, comprehensively documenting the language:
1212
[The Rust Programming Language](https://doc.rust-lang.org/book/)
1313
- [The Async Book](https://rust-lang.github.io/async-book/)

docs/platforms/android/data-management/sensitive-data/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Sensitive data may appear in the following areas:
5454
- User context → Automated behavior is controlled via <PlatformIdentifier name="send-default-pii" />.
5555
- HTTP context → Query strings may be picked up in some frameworks as part of the HTTP request context.
5656
- Transaction Names → In certain situations, transaction names might contain sensitive data. For example, a browser's pageload transaction might have a raw URL like `/users/1234/details` as its name (where `1234` is a user id, which may be considered PII). In most cases, our SDKs can parameterize URLs and routes successfully, that is, turn `/users/1234/details` into `/users/:userid/details`. However, depending on the framework, your routing configuration, race conditions, and a few other factors, the SDKs might not be able to completely parameterize all of your URLs.
57+
- HTTP Spans → Most SDKs will include the HTTP query string and fragment as a data attribute, which means the HTTP span may need to be scrubbed.
5758

5859
For more details and data filtering instructions, see <PlatformLink to="/configuration/filtering/">Filtering Events</PlatformLink>.
5960

docs/platforms/apple/common/data-management/sensitive-data/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Sensitive data may appear in the following areas:
5858
- User context → Automated behavior is controlled via <PlatformIdentifier name="send-default-pii" />.
5959
- HTTP context → Query strings may be picked up in some frameworks as part of the HTTP request context.
6060
- Transaction Names → In certain situations, transaction names might contain sensitive data. For example, a browser's pageload transaction might have a raw URL like `/users/1234/details` as its name (where `1234` is a user id, which may be considered PII). In most cases, our SDKs can parameterize URLs and routes successfully, that is, turn `/users/1234/details` into `/users/:userid/details`. However, depending on the framework, your routing configuration, race conditions, and a few other factors, the SDKs might not be able to completely parameterize all of your URLs.
61+
- HTTP Spans → Most SDKs will include the HTTP query string and fragment as a data attribute, which means the HTTP span may need to be scrubbed.
6162

6263
For more details and data filtering instructions, see <PlatformLink to="/configuration/filtering/">Filtering Events</PlatformLink>.
6364

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: SDK Overhead
3+
description: "Learn about Sentry's Apple SDK overhead and how you can tailor your configuration to minimize it."
4+
sidebar_order: 7500
5+
---
6+
7+
Adding new features or dependencies to your app incurs additional costs on resources - CPU time, memory usage, and network bandwidth, among other things. Sentry SDKs are no different. This document adds transparency to the possible overhead that using our SDK can add, and help you find the feature set and configurations that work best for you.
8+
9+
## General Approach
10+
11+
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.
12+
13+
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.
14+
15+
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-cocoa/issues/new/choose) on our SDK repo and make sure you provide as much context as you can.
16+
17+
## Error Monitoring
18+
19+
During regular operation, error monitoring incurs little to no overhead. Once an error or crash occurs, the user experience is compromised, and any crash handling routines operate under time constraints imposed by the system. This means that these implementations are highly optimized to perform the required work as quickly as possible.
20+
21+
The SDK also provides methods to manually capture events: <PlatformLink to="/usage/#capturing-errors">`captureError`</PlatformLink> and <PlatformLink to="/usage/#capturing-messages">`captureMessage`</PlatformLink>. These methods perform some complex operations, such as capturing stack trace information, and while they are highly optimized as well, calling them in tight loops should be avoided.
22+
23+
<PlatformSection supported={["apple.ios", "apple.visionos"]}>
24+
25+
## Screenshots and View Hierarchy
26+
27+
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.
28+
29+
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.
30+
31+
</PlatformSection>
32+
33+
## Breadcrumbs
34+
35+
<PlatformLink to="/enriching-events/breadcrumbs">Breadcrumbs</PlatformLink> are collected through automated integrations or by manually adding them. To have them readily available for every event generated by the SDK, they are continuously persisted, and managed in a performant buffer. This shouldn't impact user experience.
36+
37+
Capturing excessive numbers of breadcrumbs (for example, creating breadcrumbs for all log messages) can cause significant performance overhead. To mitigate this, review and adapt your app's usage of breadcrumbs. For example, increase the min-level of log messages that create breadcrumbs from `warn` to `error`.
38+
39+
Note that increasing the max number of breadcrumbs **does not** improve performance and can even have a detrimental effect.
40+
41+
## Tracing and Performance Monitoring
42+
43+
As stated in our <Link to="/product/performance/performance-overhead">product docs on the topic</Link>, Tracing adds some overhead, but should have minimal impact on the performance of your application. In typical scenarios, the expected overhead is less than 3% of the app's resource utilization.
44+
45+
<PlatformSection supported={["apple.ios", "apple.macos"]}>
46+
47+
## Profiling
48+
49+
As stated in our <Link to="/product/explore/profiling/performance-overhead">product docs on the topic</Link>, Profiling adds some overhead, but should have minimal impact on the performance of your application. In typical scenarios, the expected overhead is less than 5% of the app's resource utilization.
50+
51+
</PlatformSection>
52+
53+
<PlatformSection supported={["apple.ios"]}>
54+
55+
## Session Replay
56+
57+
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>.
58+
59+
Note that this feature is still under development. We're working on performance improvements to mitigate a known issue where active Session Replay recording can currently introduce slow frames, especially on older iOS devices (for example iPhone 8).
60+
61+
</PlatformSection>

docs/platforms/dart/data-management/sensitive-data/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Sensitive data may appear in the following areas:
4848
- User context → Automated behavior is controlled via <PlatformIdentifier name="send-default-pii" />.
4949
- HTTP context → Query strings may be picked up in some frameworks as part of the HTTP request context.
5050
- Transaction Names → In certain situations, transaction names might contain sensitive data. For example, a browser's pageload transaction might have a raw URL like `/users/1234/details` as its name (where `1234` is a user id, which may be considered PII). In most cases, our SDKs can parameterize URLs and routes successfully, that is, turn `/users/1234/details` into `/users/:userid/details`. However, depending on the framework, your routing configuration, race conditions, and a few other factors, the SDKs might not be able to completely parameterize all of your URLs.
51+
- HTTP Spans → Most SDKs will include the HTTP query string and fragment as a data attribute, which means the HTTP span may need to be scrubbed.
5152

5253
For more details and data filtering instructions, see <PlatformLink to="/configuration/filtering/">Filtering Events</PlatformLink>.
5354

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: SDK Overhead
3+
description: "Learn about Sentry's Dart SDK overhead and how you can tailor your configuration to minimize it."
4+
sidebar_order: 7500
5+
---
6+
7+
Adding new features or dependencies to your app incurs additional costs on resources - CPU time, memory usage, and network bandwidth, among other things. Sentry SDKs are no different. This document adds transparency to the possible overhead that using our SDK can add, and help you find the feature set and configurations that work best for you.
8+
9+
## General Approach
10+
11+
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.
12+
13+
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 some tasks to native implementations, use debouncing when appropriate, or we postpone processing to a later time if possible.
14+
15+
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-dart/issues/new/choose) on our SDK repo and make sure you provide as much context as you can.
16+
17+
## Error Monitoring
18+
19+
During regular operation, error monitoring incurs little to no overhead. Once an error or crash occurs, the user experience is compromised, and any crash handling routines operate under time constraints imposed by the system. This means that these implementations are highly optimized to perform the required work as quickly as possible.
20+
21+
The SDK also provides methods to manually capture events: <PlatformLink to="/usage/#capturing-errors">`captureError`</PlatformLink> and <PlatformLink to="/usage/#capturing-messages">`captureMessage`</PlatformLink>. These methods perform some complex operations, such as capturing stack trace information, and while they are highly optimized as well, calling them in tight loops should be avoided.
22+
23+
## Breadcrumbs
24+
25+
<PlatformLink to="/enriching-events/breadcrumbs">Breadcrumbs</PlatformLink> are collected through automated integrations or by manually adding them. To have them readily available for every event generated by the SDK, they are continuously persisted, and managed in a performant buffer. This shouldn't impact user experience.
26+
27+
Capturing excessive numbers of breadcrumbs (for example, creating breadcrumbs for all log messages) can cause significant performance overhead. To mitigate this, review and adapt your app's usage of breadcrumbs. For example, increase the min-level of log messages that create breadcrumbs from `warn` to `error`.
28+
29+
Note that increasing the max number of breadcrumbs **does not** improve performance and can even have a detrimental effect.
30+
31+
## Tracing and Performance Monitoring
32+
33+
As stated in our <Link to="/product/performance/performance-overhead">product docs on the topic</Link>, Tracing adds some overhead, but should have minimal impact on the performance of your application. In typical scenarios, the expected overhead is less than 3% of the app's resource utilization.

docs/platforms/dotnet/common/data-management/sensitive-data/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Sensitive data may appear in the following areas:
5454
- User context → Automated behavior is controlled via <PlatformIdentifier name="send-default-pii" />.
5555
- HTTP context → Query strings may be picked up in some frameworks as part of the HTTP request context.
5656
- Transaction Names → In certain situations, transaction names might contain sensitive data. For example, a browser's pageload transaction might have a raw URL like `/users/1234/details` as its name (where `1234` is a user id, which may be considered PII). In most cases, our SDKs can parameterize URLs and routes successfully, that is, turn `/users/1234/details` into `/users/:userid/details`. However, depending on the framework, your routing configuration, race conditions, and a few other factors, the SDKs might not be able to completely parameterize all of your URLs.
57+
- HTTP Spans → Most SDKs will include the HTTP query string and fragment as a data attribute, which means the HTTP span may need to be scrubbed.
5758

5859
For more details and data filtering instructions, see <PlatformLink to="/configuration/filtering/">Filtering Events</PlatformLink>.
5960

docs/platforms/dotnet/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: "Learn how to manually instrument your code to use Sentry's Caches
66

77
A cache can be used to speed up data retrieval, thereby improving application performance. Because instead of getting data from a potentially slow data layer, your application will be getting data from memory (in a best case scenario). Caching can speed up read-heavy workloads for applications like Q&A portals, gaming, media sharing, and social networking.
88

9-
Sentry offers a [cache-monitoring dashboard](https://sentry.io/orgredirect/organizations/:orgslug/insights/caches/) for getting an overview of your application's caches.
9+
Sentry offers a [cache-monitoring dashboard](https://sentry.io/orgredirect/organizations/:orgslug/insights/backend/caches/) for getting an overview of your application's caches.
1010

1111
To make it possible for Sentry to give you an overview of your cache performance, you'll need to create two spans - one indicating that something is being put into the cache, and a second one indicating that something is being fetched from the cache.
1212

@@ -102,4 +102,4 @@ public class MyCachingService
102102
}
103103
```
104104

105-
You should now have the right spans in place. Head over to the [Cache dashboard](https://sentry.io/orgredirect/organizations/:orgslug/performance/caches/) to see how your cache is performing.
105+
You should now have the right spans in place. Head over to the [Cache dashboard](https://sentry.io/orgredirect/organizations/:orgslug/insights/backend/caches/) to see how your cache is performing.

docs/platforms/elixir/data-management/sensitive-data/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Sensitive data may appear in the following areas:
4848
- User context → Automated behavior is controlled via <PlatformIdentifier name="send-default-pii" />.
4949
- HTTP context → Query strings may be picked up in some frameworks as part of the HTTP request context.
5050
- Transaction Names → In certain situations, transaction names might contain sensitive data. For example, a browser's pageload transaction might have a raw URL like `/users/1234/details` as its name (where `1234` is a user id, which may be considered PII). In most cases, our SDKs can parameterize URLs and routes successfully, that is, turn `/users/1234/details` into `/users/:userid/details`. However, depending on the framework, your routing configuration, race conditions, and a few other factors, the SDKs might not be able to completely parameterize all of your URLs.
51+
- HTTP Spans → Most SDKs will include the HTTP query string and fragment as a data attribute, which means the HTTP span may need to be scrubbed.
5152

5253
For more details and data filtering instructions, see <PlatformLink to="/configuration/filtering/">Filtering Events</PlatformLink>.
5354

0 commit comments

Comments
 (0)