Skip to content

Commit de21794

Browse files
authored
Merge branch 'master' into rework-node-docs
2 parents 0827368 + 23e6fa0 commit de21794

File tree

55 files changed

+1126
-100
lines changed

Some content is hidden

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

55 files changed

+1126
-100
lines changed

src/components/banner.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import React, { useState, useEffect } from "react";
55
// This is a lazy way of doing things but will work until
66
// we put a more robust solution in place.
77
//
8-
const SHOW_BANNER = false;
8+
const SHOW_BANNER = true;
99
const BANNER_TEXT =
10-
"Learn how to customize performance monitoring in real time with Tonal in a live workshop on Nov. 1 @ 11am PT.";
10+
"Join us for our upcoming integration workshop with Cloudflare on 12/8 at 10am PT.";
1111
const BANNER_LINK_URL =
12-
"https://sentry.io/resources/ama-deep-dive-performance-monitoring/?promo_name=docs-banner";
12+
"https://sentry.io/resources/cloudflare-built-sentry-client-for-serverless-computing/?promo_name=docs-banner";
1313
const BANNER_LINK_TEXT = "Register here.";
1414
const OPTIONAL_BANNER_IMAGE = null;
1515

src/docs/product/discover-queries/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Discover Queries"
2+
title: "Discover"
33
sidebar_order: 5
44
redirect_from:
55
- /product/discover/

src/docs/product/integrations/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ For more details, see the [full Integration Platform documentation](/product/int
2828
| OpsGenie | X | | |
2929
| [PagerDuty](/product/integrations/notification-incidents/pagerduty/) | X | X | |
3030
| Pushover | X | | |
31+
| [Rootly](/product/integrations/notification-incidents/rootly/) | X | X | |
3132
| [Slack](/product/integrations/notification-incidents/slack/) | X | X | X |
32-
| [Spike.sh](/product/integrations/notification-incidents/spikesh/) | X | X |
33+
| [Spike.sh](/product/integrations/notification-incidents/spikesh/) | X | X | |
3334
| [Threads](/product/integrations/notification-incidents/threads/) | X | X | |
3435
| Twilio | X | | |
3536
| VictorOps | X | | |

src/docs/product/integrations/integration-platform/webhooks.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ import hashlib
6565
import hmac
6666
import json
6767

68-
expected_digest = request.headers['sentry-hook-signature']
68+
expected_digest = request.headers.get('sentry-hook-signature') # returns None if header is missing
6969
body = json.dumps(request.body)
7070

7171
digest = hmac.new(
@@ -74,8 +74,10 @@ digest = hmac.new(
7474
digestmod=hashlib.sha256,
7575
).hexdigest()
7676

77+
if not expected_digest: # The signature is missing
78+
raise UnauthorizedError
7779

78-
if digest != expected_digest:
80+
if not hmac.compare_digest(digest, expected_digest):
7981
raise UnauthorizedError
8082
```
8183

src/docs/product/integrations/notification-incidents/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Learn more about Sentry's notification and incidents integrations:
1111
- OpsGenie
1212
- [PagerDuty](/product/integrations/notification-incidents/pagerduty/)
1313
- Pushover
14+
- [Rootly](/product/integrations/notification-incidents/rootly/)
1415
- [Slack](/product/integrations/notification-incidents/slack/)
1516
- [Spike.sh](/product/integrations/notification-incidents/spikesh/)
1617
- [Threads](/product/integrations/notification-incidents/threads/)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Rootly
3+
sidebar_order: 1
4+
redirect_from:
5+
- /product/integrations/rootly/
6+
description: "Learn about Sentry's Rootly integration and how it creates incidents from Sentry Alerts."
7+
---
8+
9+
Rootly is a Slack-native incident management app and platform that automates tedious manual work during incidents.
10+
11+
12+
This integration is maintained and supported by the company that created it. For more details, check out our [Integration Platform documentation](/product/integrations/integration-platform/).
13+
14+
## Install and Configure
15+
16+
<Note>
17+
18+
Sentry owner, manager, or admin permissions are required to install this integration.
19+
20+
Rootly **won't** work with self-hosted Sentry.
21+
22+
</Note>
23+
24+
1. Navigate to **Settings > Integrations > Rootly**
25+
26+
2. Follow the full [Rootly installation instructions](https://docs.rootly.com/integrations/sentry).

src/docs/product/issues/issue-details/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ This page displays the "Details" tab when it first opens, but several other tabs
3535
- **User Feedback** - Any feedback collected from users through the <PlatformLink to="/enriching-events/user-feedback/">SDK's user feedback</PlatformLink>.
3636
- <PlatformLink to="/enriching-events/attachments/">**Attachments**</PlatformLink> - Stored additional files, such as config or log files that are related to the error event.
3737
- **Tags** - More detailed information about the tags across all the events included in the issue.
38-
- **Events** - A list of all the error events included in the issue.
38+
- **All Events** - A list of all the error events included in the issue.
3939
- **Merged Issues** - A list of error issues that have been merged with this one.
4040
- **Similar Issues** - A list of error issues that have a similar stack trace [that you can merge](/product/data-management-settings/event-grouping/merging-issues/).

src/docs/product/performance/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Performance Monitoring"
2+
title: "Performance"
33
sidebar_order: 2
44
redirect_from:
55
- /performance/

src/docs/product/sentry-basics/search/searchable-properties.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ Release properties overlap with event and issue search properties, so they don't
9393
| device.name | Details of the device | x | | string |
9494
| device.online | Whether the device was online or not. A string that is either `True` or `False`. | x | | string |
9595
| device.orientation | Describes the orientation of the device and can be either `portrait` or `landscape`. | x | x | string |
96+
| device.screen_density | Device screen density in pixels. | x | x | string |
97+
| device.screen_dpi | Number of dots per inch of the device screen. | x | x | string |
98+
| device.screen_height_pixels | Device screen height in pixels. | x | x | string |
99+
| device.screen_width_pixels | Device screen width in pixels. | x | x | string |
96100
| device.simulator | Indicates whether this device is a simulator or a real device. A string that is either `True` or `False`. | x | | string |
97101
| device.uuid | Deprecated | x | x | uuid |
98102
| dist | Distinguishes build or deployment variants of the same release of an application. For example, the dist can be the build number of an XCode build or the version code of an Android build. | x | x | string |

src/gatsby/onPostBuild.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ export default async ({ graphql }) => {
7373
};
7474

7575
const parsePathSlug = (slug: string) => {
76-
if (slug.includes("performance-onboarding")) {
76+
if (slug.includes("/performance-onboarding/") || slug.includes("/replay-onboarding/")) {
7777
const pathMatch = slug.match(
78-
/^\/(?<platform>[^/]+)\/performance-onboarding\/(?<sub_platform>[^/]+)\/(?<step>[^/]+)\/$/
78+
/^\/(?<platform>[^/]+)\/(?<product>performance|replay)-onboarding\/(?<sub_platform>[^/]+)\/(?<step>[^/]+)\/$/
7979
);
80-
80+
8181
if(!pathMatch) {
8282
throw new Error(`Unable to parse performance onboarding from slug: ${slug}`);
8383
}
84-
85-
const { platform, sub_platform } = pathMatch.groups;
84+
85+
const { platform, product, sub_platform } = pathMatch.groups;
8686
const step = String(pathMatch.groups.step).replace(/\./g, "-");
87-
const sub = platform === sub_platform ? `performance-onboarding-${step}` : `${sub_platform}-performance-onboarding-${step}`;
87+
const sub = platform === sub_platform ? `${product}-onboarding-${step}` : `${sub_platform}-${product}-onboarding-${step}`;
8888

8989
return {
9090
platform,

src/gatsby/utils/resolveOpenAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { promises as fs } from "fs";
33

44
// SENTRY_API_SCHEMA_SHA is used in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
55
// DO NOT change variable name unless you change it in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
6-
const SENTRY_API_SCHEMA_SHA = "d907372d5ed461a40d1d99b16fcee5ec52279ed0"
6+
const SENTRY_API_SCHEMA_SHA = "cf7f2cc9a9e4bfa437f947ba8b007ebe10b7dc16"
77

88
const activeEnv =
99
process.env.GATSBY_ENV || process.env.NODE_ENV || "development";
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
```dart
2+
import 'package:flutter/widgets.dart';
3+
import 'package:sentry_flutter/sentry_flutter.dart';
4+
5+
Future<void> main() async {
6+
await SentryFlutter.init(
7+
(options) {
8+
options.dsn = '___PUBLIC_DSN___';
9+
options.attachScreenshot = true;
10+
},
11+
appRunner: () => runApp(
12+
// Wrap your app widget with the [SentryScreenshotWidget] widget.
13+
SentryScreenshotWidget(
14+
child: MyApp(),
15+
),
16+
),
17+
);
18+
}
19+
```

src/platform-includes/getting-started-config/apple.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ func application(_ application: UIApplication,
1616
options.enableAppHangTracking = true
1717
options.enableFileIOTracking = true
1818
options.enableCoreDataTracking = true
19+
options.enableCaptureFailedRequests = true
1920
}
2021

2122
return true
@@ -35,6 +36,7 @@ func application(_ application: UIApplication,
3536
options.enableAppHangTracking = YES;
3637
options.enableFileIOTracking = YES;
3738
options.enableCoreDataTracking = YES;
39+
options.enableCaptureFailedRequests = YES;
3840
}];
3941

4042
return YES;
@@ -57,6 +59,7 @@ struct SwiftUIApp: App {
5759
options.enableAppHangTracking = true
5860
options.enableFileIOTracking = true
5961
options.enableCoreDataTracking = true
62+
options.enableCaptureFailedRequests = true
6063
}
6164
}
6265
}

src/platform-includes/getting-started-primer/android.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ The SDK builds a crash report that persists to disk and tries to send the report
3838
- Apollo request spans with [Apollo Integration](/platforms/android/configuration/integrations/apollo/)
3939
- Distributed tracing through [OkHttp](/platforms/android/configuration/integrations/okhttp/) and [Apollo](/platforms/android/configuration/integrations/apollo/) integrations
4040
- [Application Not Responding (ANR)](/platforms/android/configuration/app-not-respond/) reported if the application is blocked for more than five seconds
41+
- [HTTP Client Errors](/platforms/android/configuration/integrations/okhttp/#http-client-errors)
42+
- [Screenshot attachments for errors](/platforms/android/enriching-events/screenshots/)
4143
- Code samples provided in both Kotlin and Java as the Android SDK uses both languages
4244
- We provide a [sample application](https://github.com/getsentry/sentry-java/tree/master/sentry-samples/sentry-samples-android) for our Android users
4345
- Our [video tutorial](/platforms/android/android-video/) visually demonstrates how to set up our SDK

src/platform-includes/getting-started-primer/apple.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Error messages of fatalError, assert, and precondition
1212
- [App Hang Detection](/platforms/apple/configuration/app-hangs/)
1313
- [Out of memory](/platforms/apple/configuration/out-of-memory/)
14+
- [HTTP Client Errors](/platforms/apple/configuration/http-client-errors/)
1415
- Start-up crashes. The SDK init waits synchronously for up to 5 seconds to flush out events if the app crashes within 2 seconds after the SDK init.
1516
- Events [enriched](/platforms/apple/enriching-events/context/) with device data
1617
- Offline caching when a device is unable to connect; we send a report once we receive another event
@@ -32,3 +33,4 @@
3233
- <PlatformLink to="/performance/instrumentation/automatic-instrumentation/#user-interaction-tracing">User Interaction</PlatformLink> transactions for UI clicks (experimental)
3334
- [Attachments](/platforms/apple/enriching-events/attachments/) enrich your event by storing additional files, such as config or log files
3435
- [User Feedback](/platforms/apple/enriching-events/user-feedback/) provides the ability to collect user information when an event occurs
36+
- [Screenshot attachments for errors](/platforms/apple/guides/ios/enriching-events/screenshots/)

src/platform-includes/getting-started-primer/flutter.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ Features:
2929
- [Slow and frozen frames](/platforms/flutter/performance/instrumentation/automatic-instrumentation/#slow-and-frozen-frames)
3030
- [AssetBundle Instrumentation](/platforms/flutter/performance/instrumentation/automatic-instrumentation/#assetbundle-instrumentation)
3131
- [Logging Integration](/platforms/dart/configuration/integrations/logging)
32+
- [Screenshot attachments for errors](/platforms/flutter/enriching-events/screenshots/)
3233
- Limited support for Flutter Web, Windows, and Linux
3334
- Under the hood the SDK relies on the [Dart SDK](/platforms/dart/); the minimum required version is `2.12.0` and Flutter SDK version is `1.17.0`.
Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
1-
If you are also using Performance Monitoring for [JavaScript](/platforms/javascript/performance/), depending on where your request originates, you can connect traces:
2-
1. For requests that start in your backend, by [adding a meta tag](/platforms/javascript/performance/connect-services/#pageload) in your HTML template that contains tracing information.
3-
2. For requests that start in JavaScript, by the SDK [setting a header](/platforms/javascript/performance/connect-services/#navigation-and-other-xhr-requests) on requests to your backend.
1+
## Distributed Tracing
42

5-
Otherwise, backend services with Performance Monitoring connect automatically.
3+
To obtain a trace from a span, use `toTraceParent()` method. This method returns a string that can be used as a value of the `traceparent` HTTP header:
4+
5+
```javascript
6+
const sentryTraceHeader = span.toTraceparent();
7+
8+
requestOptions.headers = {
9+
...requestOptions.headers,
10+
'sentry-trace': sentryTraceHeader,
11+
};
12+
```
13+
14+
To create a span as a continuation of the trace retrieved from the upstream service, use `extractTraceparentData` function from `@sentry/tracing`:
15+
16+
```javascript
17+
import { extractTraceparentData } from "@sentry/tracing";
18+
19+
// The request headers sent by your upstream service to your backend.
20+
const traceparentData = extractTraceparentData(request.headers['sentry-trace']);
21+
22+
const transaction = Sentry.startTransaction({
23+
op: 'transaction_op',
24+
name: 'transaction_name',
25+
...traceparentData,
26+
});
27+
```

src/platforms/android/common/gradle.mdx

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ description: "Learn about using the Sentry Android Gradle Plugin."
55
---
66

77
The [Sentry Android Gradle Plugin](https://github.com/getsentry/sentry-android-gradle-plugin) is an addition to the main Android and Hybrid SDKs (like React Native and Flutter) and offers
8-
seamless integration with the Gradle build system. It supports the upload of ProGuard/R8 mappings and of Native debug symbols and sources, as well as
9-
auto-instrumentation tracing through bytecode manipulation.
8+
seamless integration with the Gradle build system. It supports the following features:
9+
10+
- ProGuard/R8 mappings upload
11+
- Native debug symbols and sources upload
12+
- Auto-instrumentation tracing through bytecode manipulation
13+
- Auto-installation of the Sentry Android SDK and its integrations
14+
- External dependencies report
1015

1116
## Setup
1217

@@ -89,7 +94,7 @@ sentry {
8994
9095
// Specifies a set of instrumentation features that are eligible for bytecode manipulation.
9196
// Defaults to all available values of InstrumentationFeature enum class.
92-
features = [InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP]
97+
features = [InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP, InstrumentationFeature.COMPOSE]
9398
}
9499
95100
// Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations).
@@ -109,6 +114,14 @@ sentry {
109114
// Defaults to the latest published sentry version.
110115
sentryVersion = '{{ packages.version('sentry.java.android', '5.0.0') }}'
111116
}
117+
118+
// Disables or enables dependencies metadata reporting for Sentry.
119+
// If enabled, the plugin will collect external dependencies and
120+
// upload them to Sentry as part of events. If disabled, all the logic
121+
// related to the dependencies metadata report will be excluded.
122+
//
123+
// Default is enabled.
124+
includeDependenciesReport = true
112125
}
113126
```
114127

@@ -154,10 +167,10 @@ sentry {
154167

155168
// Specifies a set of instrumentation features that are eligible for bytecode manipulation.
156169
// Defaults to all available values of InstrumentationFeature enum class.
157-
features.set(setOf(InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP))
170+
features.set(setOf(InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP, InstrumentationFeature.COMPOSE))
158171
}
159172

160-
// Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations).
173+
// Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber, fragment and compose integrations).
161174
// Default is enabled.
162175
// Only available v3.1.0 and above.
163176
autoInstallation {
@@ -174,6 +187,15 @@ sentry {
174187
// Defaults to the latest published sentry version.
175188
sentryVersion.set("{{ packages.version('sentry.java.android', '5.0.0') }}")
176189
}
190+
191+
// Disables or enables dependencies metadata reporting for Sentry.
192+
// If enabled, the plugin will collect external dependencies and
193+
// upload them to Sentry as part of events. If disabled, all the logic
194+
// related to the dependencies metadata report will be excluded.
195+
//
196+
// Default is enabled.
197+
//
198+
includeDependenciesReport.set(true)
177199
}
178200
```
179201

@@ -292,7 +314,15 @@ enum class InstrumentationFeature {
292314
* Requires sentry-android SDK version 5.0.0 and above.
293315
* Only available v3.1.0 and above of the Sentry Android Gradle plugin.
294316
*/
295-
OKHTTP
317+
OKHTTP,
318+
319+
/**
320+
* When enabled the SDK will create breadcrumbs when navigating
321+
* using [androidx.navigation.NavController].
322+
* This feature uses bytecode manipulation and adds an OnDestinationChangedListener to all
323+
* navigation controllers used in Jetpack Compose.
324+
*/
325+
COMPOSE
296326
}
297327
```
298328

@@ -306,7 +336,7 @@ To learn more about the internals of auto-instrumentation, check out this [blog
306336

307337
## Auto-Installation
308338

309-
The plugin offers the automated installation feature of the Sentry Android SDK and the [Fragment](/platforms/android/configuration/integrations/fragment/), [Timber](/platforms/android/configuration/integrations/timber/), and [OkHttp](/platforms/android/configuration/integrations/okhttp/) integrations. Starting with version 3.1.0, the feature is enabled by default, so you don't need to add any dependencies — you just use the Sentry Gradle plugin.
339+
The plugin offers the automated installation feature of the Sentry Android SDK and the [Fragment](/platforms/android/configuration/integrations/fragment/), [Timber](/platforms/android/configuration/integrations/timber/), [OkHttp](/platforms/android/configuration/integrations/okhttp/), and [Jetpack Compose](/platforms/android/configuration/integrations/jetpack-compose/) integrations. Starting with version 3.1.0, the feature is enabled by default, so you don't need to add any dependencies — you just use the Sentry Gradle plugin.
310340

311341
The plugin algorithm does the following when defining dependency versions:
312342

src/platforms/android/configuration/integrations/fragment.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,25 @@ SentryAndroid.init(this) { options ->
8181
}
8282
```
8383

84+
You can also configure which fragment lifecycle events will be added as breadcrumbs.
85+
86+
```kotlin
87+
import android.app.Application
88+
import io.sentry.android.core.SentryAndroid
89+
import io.sentry.android.fragment.FragmentLifecycleIntegration
90+
import io.sentry.android.fragment.FragmentLifecycleState.CREATED
91+
import io.sentry.android.fragment.FragmentLifecycleState.DESTROYED
92+
93+
SentryAndroid.init(this) { options ->
94+
options.addIntegration(
95+
FragmentLifecycleIntegration(
96+
this,
97+
filterFragmentLifecycleBreadcrumbs = setOf(FragmentLifecycleState.CREATED, FragmentLifecycleState.DESTROYED)
98+
)
99+
)
100+
}
101+
```
102+
84103
## Verify
85104

86105
Create a new `Fragment` view and add a button to it.

0 commit comments

Comments
 (0)