Skip to content

Commit

Permalink
Merge branch 'master' into aliu/ff-integration-doc-python
Browse files Browse the repository at this point in the history
  • Loading branch information
aliu39 authored Dec 23, 2024
2 parents e7bff6c + fae853c commit 4470aa5
Show file tree
Hide file tree
Showing 37 changed files with 479 additions and 122 deletions.
11 changes: 11 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
data-api="https://plausible.io/api/event"
src="https://plausible.io/js/script.tagged-events.js"
/>
<Script
async
src="https://widget.kapa.ai/kapa-widget.bundle.js"
data-website-id="cac7cc70-969e-4bc1-a968-55534a839be4"
data-button-hide // do not render kapa ai button
data-modal-override-open-class="kapa-ai-class" // all elements with this class will open the kapa ai modal
data-project-name="Sentry"
data-project-color="#6A5FC1"
data-project-logo="https://docs.sentry.io/_next/static/media/sentry-logo-dark.fc8e1eeb.svg"
data-font-family="var(--font-rubik)"
/>
</html>
);
}
4 changes: 2 additions & 2 deletions develop-docs/sdk/telemetry/traces/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ If no `tracesSampler` callback is used, the SDK fully inherits sampling decision

The random value is set according to the following rules:

1. When an SDK starts a new trace, `sample_rand` is always set to a random number in the range of `[0, 1]`. This explicitly includes traces that aren't sampled, as well as when the `tracesSampleRate` is set to `0.0` or `1.0`.
1. When an SDK starts a new trace, `sample_rand` is always set to a random number in the range of `[0, 1)` (including 0.0, excluding 1.0). This explicitly includes traces that aren't sampled, as well as when the `tracesSampleRate` is set to `0.0` or `1.0`.
2. It is _recommended_ to generate the random number deterministically using the trace ID as seed or source of randomness. The exact method by which the random number is created is implementation defined and may vary between SDK implementations. See 4. on why this behaviour is desirable.
3. On incoming traces, an SDK assumes the `sample_rand` value along with the rest of the DSC, overriding an existing value if needed.
4. If `sample_rand` is missing on an incoming trace, the SDK creates and from now on propagates a new random number on-the-fly, based on the following rules:
1. If `sample_rate` and `sampled` are propgated, create `sample_rand` so that it adheres to the invariant. This means, for a decision of `True` generate a random number in half-open range `[0, rate)` and for a decision of `False` generate a random number in range `[rate, 1]`.
2. If the sampling decision is missing, generate a random number in range of `[0, 1]`, like for a new trace.
2. If the sampling decision is missing, generate a random number in range of `[0, 1)` (including 0.0, excluding 1.0), like for a new trace.

The SDK should always use the stored random number (`sentry-sample_rand`) for sampling decisions and should no longer rely on `math.random()` or similar functions in tracing code:

Expand Down
14 changes: 14 additions & 0 deletions docs/platforms/android/enriching-events/attachments/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ The filename is the name of the file to display in Sentry. When using bytes you

The type of content stored in this attachment. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used; the default is `application/octet-stream`.

`mimetype`

The specific media content type that determines how the attachment is rendered in the Sentry UI. We currently support and can render the following MIME types:

- `text/plain`
- `text/css`
- `text/csv`
- `text/html`
- `text/javascript`
- `text/json` or `text/x-json` or `application/json` or `application/ld+json`
- `image/jpeg`
- `image/png`
- `image/gif`

## Uploading Attachments

<PlatformContent includePath="enriching-events/add-attachment" />
Expand Down
2 changes: 0 additions & 2 deletions docs/platforms/android/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ Select which Sentry features you'd like to install in addition to Error Monitori

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

In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](https://docs.sentry.io/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](https://docs.sentry.io/product/explore/profiling/). To enable tracing and/or profiling, click the corresponding checkmarks to get the code snippets.

We recommend installing the SDK through our [Sentry Wizard](https://github.com/getsentry/sentry-wizard) by running the following command inside your project directory:

```bash
Expand Down
4 changes: 3 additions & 1 deletion docs/platforms/android/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ description: "Learn how to enable the Beta of Mobile Session Replay in your app.

<Note>

Mobile support for Session Replay is in Beta. Features available in Beta are still work-in-progress and may have bugs. We recognize the irony.
Mobile support for Session Replay is in beta until January 6th, 2025. Features available in beta are still work-in-progress and may have bugs. We recognize the irony.

All beta users will continue to receive 2 months free of Session Replay for Mobile once we transition to GA.

If you have any questions, feedback or would like to report a bug, please open a [GitHub issue](https://github.com/getsentry/sentry-java/issues/new?assignees=&labels=Platform%3A+Android%2CType%3A+Bug&projects=&template=bug_report_android.yml) with a link to a relevant replay in Sentry if possible.

Expand Down
14 changes: 14 additions & 0 deletions docs/platforms/apple/common/enriching-events/attachments/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ The filename is the name of the file to display in Sentry. When using bytes you

The type of content stored in this attachment. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used; the default is `application/octet-stream`.

`mimetype`

The specific media content type that determines how the attachment is rendered in the Sentry UI. We currently support and can render the following MIME types:

- `text/plain`
- `text/css`
- `text/csv`
- `text/html`
- `text/javascript`
- `text/json` or `text/x-json` or `application/json` or `application/ld+json`
- `image/jpeg`
- `image/png`
- `image/gif`

## Uploading Attachments

Attachments live on the <PlatformLink to="/enriching-events/scopes/">Scope</PlatformLink>. You can either add an attachment on the global scope to be sent with every event or add it on the <PlatformLink to="/enriching-events/scopes/#local-scopes">local Scope</PlatformLink> to just send the attachment with one specific event.
Expand Down
128 changes: 101 additions & 27 deletions docs/platforms/apple/common/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,36 @@ The support for [visionOS](https://developer.apple.com/visionos/) is currently e

## Features

<PlatformSection notSupported={["apple.tvos", "apple.watchos", "apple.visionos"]}>

In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/).

</PlatformSection>

<PlatformSection notSupported={["apple.ios", "apple.macos"]}>

In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/).

</PlatformSection>

Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.

## Install

<OnboardingOptionButtons
options={[
'error-monitoring',
'performance',
'profiling',
]}
/>
<PlatformSection notSupported={["apple.tvos", "apple.watchos", "apple.visionos"]}>

Sentry captures data by using an SDK within your application's runtime. These are platform-specific and allow Sentry to have a deep understanding of how your application works.
<OnboardingOptionButtons options={['error-monitoring', 'performance', 'profiling']}/>

</PlatformSection>

<PlatformSection notSupported={["apple.ios", "apple.macos"]}>

<OnboardingOptionButtons options={['error-monitoring', 'performance']}/>

</PlatformSection>

In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](https://docs.sentry.io/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](https://docs.sentry.io/product/profiling/). To enable tracing and/or profiling, click the corresponding checkmarks to get the code snippets.

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

<PlatformSection notSupported={["apple.ios"]}>

Expand Down Expand Up @@ -72,8 +85,9 @@ If you prefer, you can also [set up the SDK manually](/platforms/apple/guides/io

To capture all errors, initialize the SDK as soon as possible, such as in your `AppDelegate` `application:didFinishLaunchingWithOptions` method:

<PlatformSection notSupported={["apple.tvos", "apple.watchos", "apple.visionos"]}>

```swift {tabTitle:Swift} {"onboardingOptions": {"performance": "9-12", "profiling": "13-16"}}
```swift {tabTitle:Swift} {"onboardingOptions": {"performance": "9-12", "profiling": "14-24"}}
import Sentry

func application(_ application: UIApplication,
Expand All @@ -88,22 +102,22 @@ func application(_ application: UIApplication,
options.tracesSampleRate = 1.0
}

// Manually call startProfiler and stopProfiler to profile any code that runs in between.
SentrySDK.startProfiler()
// Manually call startProfiler and stopProfiler to profile any code that runs in between.
SentrySDK.startProfiler()

//
// ...anything here will be profiled...
//
//
// ...anything here will be profiled...
//

// Calls to stopProfiler are optional - if you don't stop the profiler, it will keep profiling
// your application until the process exits, the app goes to the background, or stopProfiling is called.
SentrySDK.stopProfiler()
// Calls to stopProfiler are optional - if you don't stop the profiler, it will keep profiling
// your application until the process exits, the app goes to the background, or stopProfiling is called.
SentrySDK.stopProfiler()

return true
}
```

```objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "8-11", "profiling": "12-15"}}
```objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "8-11", "profiling": "13-23"}}
@import Sentry;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
Expand All @@ -117,16 +131,16 @@ func application(_ application: UIApplication,
options.tracesSampleRate = @1.0;
}];

// Manually call startProfiler and stopProfiler to profile any code that runs in between.
[SentrySDK startProfiler];
// Manually call startProfiler and stopProfiler to profile any code that runs in between.
[SentrySDK startProfiler];

//
// ...anything here will be profiled...
//
//
// ...anything here will be profiled...
//

// Calls to stopProfiler are optional - if you don't stop the profiler, it will keep profiling
// your application until the process exits, the app goes to the background, or stopProfiling is called.
[SentrySDK stopProfiler];
// Calls to stopProfiler are optional - if you don't stop the profiler, it will keep profiling
// your application until the process exits, the app goes to the background, or stopProfiling is called.
[SentrySDK stopProfiler];

return YES;
}
Expand All @@ -153,6 +167,66 @@ struct SwiftUIApp: App {
}
}
```
</PlatformSection>

<PlatformSection notSupported={["apple.ios", "apple.macos"]}>

```swift {tabTitle:Swift} {"onboardingOptions": {"performance": "9-12"}}
import Sentry

func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

SentrySDK.start { options in
options.dsn = "___PUBLIC_DSN___"
options.debug = true // Enabled debug when first installing is always helpful

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
}

return true
}
```

```objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "8-11"}}
@import Sentry;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
options.dsn = @"___PUBLIC_DSN___";
options.debug = YES; // Enabled debug when first installing is always helpful

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = @1.0;
}];

return YES;
}
```

```swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "9-12"}}
import Sentry

@main
struct SwiftUIApp: App {
init() {
SentrySDK.start { options in
options.dsn = "___PUBLIC_DSN___"
options.debug = true // Enabled debug when first installing is always helpful

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
}
}
}
```

</PlatformSection>

## Verify

Expand Down
8 changes: 5 additions & 3 deletions docs/platforms/apple/guides/ios/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ description: "Learn how to enable the Beta of Mobile Session Replay in your app.

<Note>

Mobile support for Session Replay is in Beta. Features available in Beta are still work-in-progress and may have bugs. We recognize the irony.
Mobile support for Session Replay is in beta until January 6th, 2025. Features available in beta are still work-in-progress and may have bugs. We recognize the irony.

If you have any questions, feedback or would like to report a bug, please open a [GitHub issue](https://github.com/getsentry/sentry-cocoa/issues/new?assignees=&labels=Platform%3A+Cocoa%2CType%3A+Bug&projects=&template=bug.yml) with a link to a relevant replay in Sentry if possible.
All beta users will continue to receive 2 months free of Session Replay for Mobile once we transition to GA.

If you have any questions, feedback or would like to report a bug, please open a [GitHub issue](https://github.com/getsentry/sentry-java/issues/new?assignees=&labels=Platform%3A+Android%2CType%3A+Bug&projects=&template=bug_report_android.yml) with a link to a relevant replay in Sentry if possible.

</Note>

Expand Down Expand Up @@ -110,4 +112,4 @@ A: Text views, input views, images, video players and webviews are all masked by

Q: What's the lowest version of iOS supported?

A: Session Replay recording happens even on the lowest version supported by the Sentry SDK, which is aligend with appstore support.
A: Session Replay recording happens even on the lowest version supported by the Sentry SDK, which is aligend with appstore support.
14 changes: 14 additions & 0 deletions docs/platforms/dart/enriching-events/attachments/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ The filename is the name of the file to display in Sentry. When using bytes you

The type of content stored in this attachment. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used; the default is `application/octet-stream`.

`mimetype`

The specific media content type that determines how the attachment is rendered in the Sentry UI. We currently support and can render the following MIME types:

- `text/plain`
- `text/css`
- `text/csv`
- `text/html`
- `text/javascript`
- `text/json` or `text/x-json` or `application/json` or `application/ld+json`
- `image/jpeg`
- `image/png`
- `image/gif`

## Uploading Attachments

Attachments live on the <PlatformLink to="/enriching-events/scopes/">Scope</PlatformLink>. You can either add an attachment on the global scope to be sent with every event or add it on the <PlatformLink to="/enriching-events/scopes/#local-scopes">local Scope</PlatformLink> to just send the attachment with one specific event.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ The filename is the name of the file to display in Sentry. When using bytes you

The type of content stored in this attachment. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used; the default is `application/octet-stream`.

`mimetype`

The specific media content type that determines how the attachment is rendered in the Sentry UI. We currently support and can render the following MIME types:

- `text/plain`
- `text/css`
- `text/csv`
- `text/html`
- `text/javascript`
- `text/json` or `text/x-json` or `application/json` or `application/ld+json`
- `image/jpeg`
- `image/png`
- `image/gif`

## Uploading Attachments

Attachments live on the <PlatformLink to="/enriching-events/scopes/">Scope</PlatformLink>. You can either add an attachment on the global scope to be sent with every event or add it on the <PlatformLink to="/enriching-events/scopes/#local-scopes">local Scope</PlatformLink> to just send the attachment with one specific event.
Expand Down
14 changes: 14 additions & 0 deletions docs/platforms/flutter/enriching-events/attachments/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ The filename is the name of the file to display in Sentry. When using bytes you

The type of content stored in this attachment. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used; the default is `application/octet-stream`.

`mimetype`

The specific media content type that determines how the attachment is rendered in the Sentry UI. We currently support and can render the following MIME types:

- `text/plain`
- `text/css`
- `text/csv`
- `text/html`
- `text/javascript`
- `text/json` or `text/x-json` or `application/json` or `application/ld+json`
- `image/jpeg`
- `image/png`
- `image/gif`

## Uploading Attachments

Attachments live on the <PlatformLink to="/enriching-events/scopes/">Scope</PlatformLink>. You can either add an attachment on the global scope to be sent with every event or add it on the <PlatformLink to="/enriching-events/scopes/#local-scopes">local Scope</PlatformLink> to just send the attachment with one specific event.
Expand Down
6 changes: 4 additions & 2 deletions docs/platforms/flutter/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ description: "Learn how to enable the Mobile Session Replay Beta in your app."

Flutter Session Replay is available on **iOS** and **Android**.

Mobile support for Session Replay is in Beta. Features available in Beta are still work-in-progress and may have bugs. We recognize the irony.
Mobile support for Session Replay is in beta until January 6th, 2025. Features available in beta are still work-in-progress and may have bugs. We recognize the irony.

If you have any questions, feedback or would like to report a bug, please open a [GitHub issue](https://github.com/getsentry/sentry-dart/issues/new?template=BUG_REPORT.yml) with a link to a relevant replay in Sentry if possible.
All beta users will continue to receive 2 months free of Session Replay for Mobile once we transition to GA.

If you have any questions, feedback or would like to report a bug, please open a [GitHub issue](https://github.com/getsentry/sentry-java/issues/new?assignees=&labels=Platform%3A+Android%2CType%3A+Bug&projects=&template=bug_report_android.yml) with a link to a relevant replay in Sentry if possible.

</Note>

Expand Down
14 changes: 14 additions & 0 deletions docs/platforms/java/common/enriching-events/attachments/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ The filename is the name of the file to display in Sentry. When using bytes you

The type of content stored in this attachment. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used; the default is `application/octet-stream`.

`mimetype`

The specific media content type that determines how the attachment is rendered in the Sentry UI. We currently support and can render the following MIME types:

- `text/plain`
- `text/css`
- `text/csv`
- `text/html`
- `text/javascript`
- `text/json` or `text/x-json` or `application/json` or `application/ld+json`
- `image/jpeg`
- `image/png`
- `image/gif`

## Uploading Attachments

<PlatformContent includePath="enriching-events/add-attachment" />
Expand Down
Loading

0 comments on commit 4470aa5

Please sign in to comment.