Skip to content

Commit

Permalink
feat: auto include SignInNote (#11151)
Browse files Browse the repository at this point in the history
* show SignInNote automatically when it's needed

* remove manual SignInNote
  • Loading branch information
a-hariti authored Aug 28, 2024
1 parent 0286343 commit 5fa1e26
Show file tree
Hide file tree
Showing 430 changed files with 29 additions and 706 deletions.
2 changes: 0 additions & 2 deletions docs/cli/crons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ To begin monitoring your recurring, scheduled job:

The Sentry CLI uses your Monitor's project DSN to authorize check-ins. To set it up, export the `SENTRY_DSN` environment variable:

<SignInNote />

```bash
export SENTRY_DSN=___PUBLIC_DSN___
```

Alternatively, you can add it to your `~/.sentryclirc` config:

<SignInNote />

```ini {filename:~/.sentryclirc}
[auth]
Expand Down
1 change: 0 additions & 1 deletion docs/cli/metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Learn more about [Metrics](/product/explore/metrics).

The Sentry CLI uses your project's DSN to authorize sending metrics. To set it up, export the `SENTRY_DSN` environment variable:

<SignInNote />
```bash
export SENTRY_DSN=___PUBLIC_DSN___
```
Expand Down
2 changes: 0 additions & 2 deletions docs/cli/send-event.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ description: "Learn how Sentry's command line interface can be used for sending

The `sentry-cli` tool can also be used for sending events. If you want to use it, you need to export the `SENTRY_DSN` environment variable and point it to the DSN of a project of yours:

<SignInNote />

```bash
export SENTRY_DSN='___PUBLIC_DSN___'
Expand Down Expand Up @@ -103,7 +102,6 @@ The limitations for this are:

Usage:

<SignInNote />

```bash
#!/bin/bash
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/android/configuration/gradle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___

We expose the following configuration values directly in your `app/build.gradle`:

<SignInNote />

````groovy
import io.sentry.android.gradle.extensions.InstrumentationFeature
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/android/configuration/manual-init.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ The SDK can catch errors and crashes only after you've initialized it. So, we re

Configuration options will be loaded from the manifest so that you don't need to have the static properties in your code. In the `init` method, you can provide a callback that will modify the configuration and also register new options.

<SignInNote />

```java
import io.sentry.SentryLevel;
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/android/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ The wizard will prompt you to log in to Sentry. It'll then automatically do the

Configuration is done via the application `AndroidManifest.xml`. Here's an example config which should get you started:

<SignInNote />

```xml {filename:AndroidManifest.xml} {"onboardingOptions": {"performance": "4-5", "profiling": "6-7"}}
<application>
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/android/manual-setup/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Version `{{@inject packages.version('sentry.java.android.gradle-plugin', '3.0.0'

Configuration is done via the application `AndroidManifest.xml`. Here's an example config which should get you started:

<SignInNote />

```xml {filename:AndroidManifest.xml}
<application>
Expand Down
2 changes: 0 additions & 2 deletions docs/platforms/android/migration/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ The file `sentry.properties` used by the previous version of the SDK has been di

Example of the configuration in the Manifest:

<SignInNote />

```xml
<application>
Expand Down Expand Up @@ -461,7 +460,6 @@ To initialize the SDK manually:

- Initialize the SDK directly in your application:

<SignInNote />

```java
SentryAndroid.init(this, options -> {
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/android/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ App start profiling is available starting in SDK version `7.3.0`.

In `AndroidManifest.xml`:

<SignInNote />

```xml
<application>
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/android/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ SentryAndroid.init(context) { options ->
<meta-data android:name="io.sentry.session-replay.session-sample-rate" android:value="1.0" />
```

<SignInNote />

## Verify

Expand Down
3 changes: 0 additions & 3 deletions docs/platforms/apple/common/configuration/app-hangs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Because the app hang detection integration uses SentryCrashIntegration to captur

You can filter and modify app hang events in `beforeSend` by checking the event exception type:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -62,7 +61,6 @@ SentrySDK.start { options in
Starting with version 8.0.0, this feature has been enabled by default. To disable it:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand All @@ -85,7 +83,6 @@ SentrySDK.start { options in
You can change the timeout by changing the `appHangTimeoutInterval` option:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Once enabled, this feature automatically captures HTTP client errors, like bad r

Since 8.0.0, this feature has been enabled by default. To disable it:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand All @@ -30,7 +29,6 @@ SentrySDK.start { options in
By default, only HTTP client errors with a response code between `500` and `599` are captured as error events, but you can change this behavior by setting the `failedRequestStatusCodes` option:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand All @@ -55,7 +53,6 @@ SentrySDK.start { options in
HTTP client errors from every target (`.*` regular expression) are automatically captured, but you can change this behavior by setting the `failedRequestTargets` option with either a regular expression or a plain `String`. A plain string must contain at least one of the items from the list. Plain strings don't have to be full matches, meaning the URL of a request is matched when it contains a string provided through the option:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -83,7 +80,6 @@ These events are searchable and you can set alerts on them if you use the `http.
The captured error event can be customized or dropped with a `beforeSend`:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/apple/common/configuration/metric-kit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ You can identify MetricKit events by looking at the `mx_hang_diagnostic`, `mx_cp

Enable this feature by setting the `enableMetricKit` option to `true`:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/apple/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ This option can be overridden using <PlatformIdentifier name="in-app-include" />

A block that configures the initial scope when starting the SDK.

<SignInNote />

```swift
import Sentry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ We renamed this integration to <PlatformLink to="/configuration/watchdog-termina

If you'd like to opt out of this feature, you can do so using options:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/apple/common/configuration/swizzling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ The Cocoa SDK uses [swizzling](https://nshipster.com/method-swizzling/) to provi

Since Cocoa 7.5.0, you can opt out of swizzling using options. When you disable swizzling, the SDK disables the features above:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ If you're interested in the implementation details, you can check out [the code]

If you'd like to opt out of this feature, you can do so using options:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/apple/common/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ 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:

<SignInNote />

```swift {tabTitle:Swift} {"onboardingOptions": {"performance": "9-12", "profiling": "13-16"}}
import Sentry
Expand Down
4 changes: 0 additions & 4 deletions docs/platforms/apple/common/migration/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ We cleaned up our public classes by removing a few functions and properties, tha

We removed the version of `SentrySDK.startWithOptions` that took a dictionary, and renamed `SentrySDK.startWithOptionsObject` to `SentrySDK.startWithOptions`. The recommended way to initialize Sentry has not changed:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -192,7 +191,6 @@ This version uses the [envelope endpoint](https://develop.sentry.dev/sdk/envelop

We removed the [deprecated SDK inits](https://github.com/getsentry/sentry-cocoa/blob/5.2.2/Sources/Sentry/include/SentrySDK.h#L35-L47). The recommended way to initialize Sentry is now:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -318,7 +316,6 @@ The samples below illustrate how the SDK works:
Example in 4.x:
<SignInNote />
```swift {tabTitle:Swift}
do {
Expand All @@ -341,7 +338,6 @@ if (nil != error) {
Example in 5.x:
<SignInNote />
```swift {tabTitle:Swift}
SentrySDK.start(options: [
Expand Down
2 changes: 0 additions & 2 deletions docs/platforms/apple/common/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ notSupported:

Profiling depends on Sentry’s Tracing product being enabled beforehand. To enable tracing in the SDK:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -51,7 +50,6 @@ iOS profiling is available starting in SDK version `8.12.0`.
</Note>
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ The SDK creates spans to provide insight into the time consumed by each of the m

To disable the `UIViewController` Tracing:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -134,7 +133,6 @@ You can filter for different app start types in [Discover](/product/explore/disc
To enable prewarmed app start tracing:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -172,7 +170,6 @@ Network Tracking is enabled by default once you <PlatformLink to="/tracing/">set
To disable the HTTP instrumentation:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -202,7 +199,6 @@ Sentry adds an extra header with the trace id in the outgoing HTTP requests to c
You can set the `tracePropagationTarget` option to filter which requests Sentry adds the extra header to.
For example, to ensure that only your app backend will receive the trace id.
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -232,7 +228,6 @@ The Sentry SDK adds spans for file I/O operations to ongoing transactions bound
Since 8.0.0, this feature has been enabled by default. To disable it:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -268,7 +263,6 @@ SentrySDK.start { options in
The Sentry SDK adds spans for Core Data operations to ongoing transactions bound to the scope. Currently, the SDK supports fetch and save operations with [NSManagedObjectContext](https://developer.apple.com/documentation/coredata/nsmanagedobjectcontext).
Since 8.0.0, this feature has been enabled by default. To disable it:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -298,7 +292,6 @@ SentrySDK.start { options in
User interaction tracing, once enabled, captures transactions for clicks. This feature is unavailable for SwiftUI. Since 8.0.0, this feature has been enabled by default. To disable it:
<SignInNote />
```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -383,7 +376,6 @@ Since Cocoa SDK version 8.33.0, the SDK doesn't create [time to initial display

_Time to full display is disabled by default, but you can enable it by setting:_

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down Expand Up @@ -441,7 +433,6 @@ This change will be the default in the next major version.

You can opt out of all automatic instrumentations using the options:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/apple/common/usage/in-app-frames/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ If you're not familiar with these terms, you can learn more:

If you use dynamic frameworks such as Sentry, the Sentry SDK will mark them as `not inApp`. If you have a private framework that should be marked as `inApp`, use the SentryOptions [`inAppInclude`](/platforms/apple/configuration/options/#in-app-include) or [`inAppExclude`](/platforms/apple/configuration/options/#in-app-exclude).

<SignInNote />

```swift {tabTitle:Swift}
import Sentry
Expand Down
2 changes: 0 additions & 2 deletions docs/platforms/apple/guides/ios/manual-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Then run `pod install`.

We recommend initializing the SDK on the main thread as soon as possible – in your AppDelegate `application:didFinishLaunchingWithOptions` method, for example:

<SignInNote />

```swift {tabTitle:Swift}
import Sentry // Make sure you import Sentry
Expand Down Expand Up @@ -67,7 +66,6 @@ func application(_ application: UIApplication,

If you're using SwiftUI and your app doesn't implement an app delegate, initialize the SDK within the [App conformer's initializer](<https://developer.apple.com/documentation/swiftui/app/main()>):

<SignInNote />

```swift
import Sentry
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/apple/guides/ios/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ SentrySDK.start(configureOptions: { options in
})
```

<SignInNote />

## Verify

Expand Down
1 change: 0 additions & 1 deletion docs/platforms/dart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ dependencies:
To capture all errors, initialize the Sentry Dart SDK as soon as possible.
<SignInNote />
```dart {"onboardingOptions": {"performance": "6-8"}}
import 'package:sentry/sentry.dart';
Expand Down
2 changes: 0 additions & 2 deletions docs/platforms/dart/integrations/dio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dependencies:
Configuration should happen as early as possible in your application's lifecycle.
<SignInNote />
```dart
import 'package:sentry_dio/sentry_dio.dart';
Expand Down Expand Up @@ -58,7 +57,6 @@ final response = await dio.get<String>('https://wrong-url.dev/');

This is an opt-out feature. The following example shows how to disable it:

<SignInNote />

```dart
import 'package:sentry/sentry.dart';
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/dart/integrations/http-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ try {

This is an opt-out feature. The following example shows how to disable it:

<SignInNote />

```dart
import 'package:sentry/sentry.dart';
Expand Down
1 change: 0 additions & 1 deletion docs/platforms/dart/integrations/logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencies:
Configuration should happen as early as possible in your application's lifecycle.
<SignInNote />
```dart
import 'package:sentry_logging/sentry_logging.dart';
Expand Down
Loading

0 comments on commit 5fa1e26

Please sign in to comment.