Skip to content

Commit ab500e1

Browse files
committed
Merge branch 'master' of github.com:getsentry/sentry-docs into smi/quick-start/react-manual-tracing
2 parents 9835c05 + 51894fe commit ab500e1

File tree

111 files changed

+1132
-327
lines changed

Some content is hidden

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

111 files changed

+1132
-327
lines changed

app/[[...path]]/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';
2222
import {
2323
getDevDocsFrontMatter,
2424
getDocsFrontMatter,
25-
getFileBySlug,
25+
getFileBySlugWithCache,
2626
getVersionsFromDoc,
2727
} from 'sentry-docs/mdx';
2828
import {mdxComponents} from 'sentry-docs/mdxComponents';
@@ -106,9 +106,9 @@ export default async function Page(props: {params: Promise<{path?: string[]}>})
106106

107107
if (isDeveloperDocs) {
108108
// get the MDX for the current doc and render it
109-
let doc: Awaited<ReturnType<typeof getFileBySlug>> | null = null;
109+
let doc: Awaited<ReturnType<typeof getFileBySlugWithCache>>;
110110
try {
111-
doc = await getFileBySlug(`develop-docs/${params.path?.join('/') ?? ''}`);
111+
doc = await getFileBySlugWithCache(`develop-docs/${params.path?.join('/') ?? ''}`);
112112
} catch (e) {
113113
if (e.code === 'ENOENT') {
114114
// eslint-disable-next-line no-console
@@ -144,9 +144,9 @@ export default async function Page(props: {params: Promise<{path?: string[]}>})
144144
}
145145

146146
// get the MDX for the current doc and render it
147-
let doc: Awaited<ReturnType<typeof getFileBySlug>> | null = null;
147+
let doc: Awaited<ReturnType<typeof getFileBySlugWithCache>>;
148148
try {
149-
doc = await getFileBySlug(`docs/${pageNode.path}`);
149+
doc = await getFileBySlugWithCache(`docs/${pageNode.path}`);
150150
} catch (e) {
151151
if (e.code === 'ENOENT') {
152152
// eslint-disable-next-line no-console

apps/changelog/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@radix-ui/react-icons": "^1.3.2",
2626
"@radix-ui/react-toolbar": "^1.1.0",
2727
"@radix-ui/themes": "^3.1.3",
28-
"@sentry/nextjs": "9.9.0",
28+
"@sentry/nextjs": "9.10.1",
2929
"@spotlightjs/spotlight": "^2.1.1",
3030
"next": "15.2.3",
3131
"next-auth": "^4.24.5",
@@ -68,4 +68,4 @@
6868
"@types/react": "npm:[email protected]",
6969
"@types/react-dom": "npm:[email protected]"
7070
}
71-
}
71+
}

apps/changelog/sentry.client.config.ts renamed to apps/changelog/src/instrumentation-client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// This file configures the initialization of Sentry on the client.
2-
// The config you add here will be used whenever a users loads a page in their browser.
3-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
4-
51
import * as SentryCore from '@sentry/core';
62
import * as Sentry from '@sentry/nextjs';
73
import * as Spotlight from '@spotlightjs/spotlight';

develop-docs/backend/application-domains/database-migrations/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ This is complicated due to our deploy process. When we deploy, we run migrations
134134

135135
To avoid this, follow these steps:
136136

137-
- Make a PR to remove all uses of the column in the codebase in a separate PR. This mostly helps with code cleanliness. This should be merged ahead of the migration prs, but we don't need to worry about whether it is deployed first.
137+
- First, if the column is either not nullable, or doesn't have a `db_default` set, then make a PR to make it nullable via `null=True`.
138+
- Then, remove all uses of the column in the codebase in a separate PR; this mostly helps with code cleanliness. This should be merged ahead of the next migration PRs, but we don't need to worry about whether it is deployed first.
138139
- Make another PR that:
139-
- Checks if the column is either not nullable, or doesn't have a `db_default` set. If either of these is true, then make it nullable via `null=True`.
140140
- If the column is a foreign key, remove the database level foreign key constraint it by setting `db_constraint=False`.
141141
- Remove the column and in the generated migration use `SafeRemoveField(..., deletion_action=DeletionAction.MOVE_TO_PENDING)` to replace `RemoveField(...)`. This only marks the state for the column as removed.
142142
- Combine these migrations together to save making multiple deploys

develop-docs/development-infrastructure/continuous-integration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ You might also be interested in <Link to="/development/environment/#troubleshoot
3232

3333
**Problem:**
3434

35-
When pushing your build to staging and you it fails the `Ensure test image` step on Travis.
35+
When pushing your build to staging and it fails the `Ensure test image` step on Travis.
3636

3737
**Solution:**
3838

docs/concepts/migration/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Below is a non-exhaustive list of some items that will not be relocated:
4848
- Issues
4949
- Events
5050
- Replays and/or other [Event Attachments](/platforms/javascript/enriching-events/attachments/)
51-
- Source Maps, [Debug Information Files](/cli/dif/) and/or [Artifact Bundles](/platforms/javascript/sourcemaps/troubleshooting_js/artifact-bundles/)
51+
- Source Maps, [Debug Information Files](/cli/dif/) and/or [Debug IDs](/platforms/javascript/sourcemaps/troubleshooting_js/debug-ids/)
5252
- Release information, including any references to external repositories via specific Pull Requests
5353
- Deployment information
5454
- Custom Avatars

docs/concepts/search/searchable-properties/session-replay.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ A release is a version of your code deployed to an environment. You can create a
226226

227227
- **Type:** string
228228

229-
### `replayType`
229+
### `replay_type`
230230

231-
The reason a replay was triggered. For example, `session` when `replaysSessionSampleRate` takes effect, or `error` when `replaysOnErrorSampleRate` is sampled instead of `session`.
231+
The reason a replay was triggered. For example, `session` when `replaysSessionSampleRate` takes effect, or `buffer` when `replaysOnErrorSampleRate` is sampled instead of `session`. Learn more in the [Session Replay docs](/platforms/javascript/session-replay/understanding-sessions/).
232232

233233
- **Type:** string
234234

docs/contributing/pages/components.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ Render an expandable section to provide additional information to users on deman
130130
provide optional information that can help users be more successful.
131131
</Expandable>
132132

133+
<Expandable title="Expandable with a code block">
134+
```js
135+
const foo = 'bar';
136+
```
137+
</Expandable>
138+
133139
```markdown {tabTitle:Example}
134140
<Expandable title="Here's something worth noting">
135141
This is an expandable section in an `'info'` alert style.

docs/platforms/android/configuration/options.mdx

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,13 @@ Set this boolean to `false` to disable tracing for `OPTIONS` requests. This opti
305305

306306
<ConfigKey name="profiles-sample-rate">
307307

308-
A number between `0` and `1`, controlling the percentage chance a given profile will be sent to Sentry. (`0` represents 0% while `1` represents 100%.) Applies only to sampled transactions created in the app. Either this or <PlatformIdentifier name="profiles-sampler" /> must be defined to enable profiling.
308+
A number between `0` and `1`, controlling the percentage chance a given profile will be sent to Sentry. (`0` represents 0% while `1` represents 100%.) Applies only to sampled transactions created in the app. Either this or <PlatformIdentifier name="profiles-sampler" /> must be defined to enable transaction profiling. Don't set it if you want to use <PlatformLink to="/profiling/#continuous-profiling">Continuous Profiling</PlatformLink>.
309309

310310
</ConfigKey>
311311

312312
<ConfigKey name="profiles-sampler">
313313

314-
A function responsible for determining the percentage chance a given profile will be sent to Sentry. It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between `0` (0% chance of being sent) and `1` (100% chance of being sent). Can also be used for filtering profiles, by returning 0 for those that are unwanted. Either this or <PlatformIdentifier name="profiles-sample-rate" /> must be defined to enable profiling.
314+
A function responsible for determining the percentage chance a given profile will be sent to Sentry. It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between `0` (0% chance of being sent) and `1` (100% chance of being sent). Can also be used for filtering profiles, by returning 0 for those that are unwanted. Either this or <PlatformIdentifier name="profiles-sample-rate" /> must be defined to enable transaction profiling. Don't set it if you want to use <PlatformLink to="/profiling/#continuous-profiling">Continuous Profiling</PlatformLink>.
315315

316316
</ConfigKey>
317317

@@ -320,3 +320,35 @@ A function responsible for determining the percentage chance a given profile wil
320320
A boolean value that determines whether the app start process will be profiled. When true, the startup process, including ContentProviders, Application and first Activity creation, will be profiled. Note that <PlatformIdentifier name="profiles-sample-rate" /> or <PlatformIdentifier name="profiles-sampler" /> must be defined.
321321

322322
</ConfigKey>
323+
324+
## Continuous Profiling Options
325+
326+
<Alert>
327+
328+
This feature is experimental and may have bugs.
329+
330+
</Alert>
331+
332+
<ConfigKey name="profile-session-sample-rate">
333+
334+
A number between `0` and `1`, controlling the percentage chance the session will be profiled. `0` represents 0% while `1` represents 100%. The default is null (disabled). <PlatformIdentifier name="profiles-sampler" /> and <PlatformIdentifier name="profiles-sample-rate" /> must not be set to enable <PlatformLink to="/profiling/#continuous-profiling">Continuous Profiling</PlatformLink>.
335+
336+
</ConfigKey>
337+
338+
<ConfigKey name="profile-lifecycle">
339+
340+
Whether the profiling lifecycle is controlled manually or based on the trace lifecycle. Possible values are:
341+
342+
- `manual`: **default** Profiler must be started and stopped through `Sentry.startProfiler()` and `Sentry.stopProfiler()` APIs
343+
- `trace`: Profiler is started and stopped automatically whenever a sampled trace starts and finishes
344+
345+
</ConfigKey>
346+
347+
<ConfigKey name="start-profiler-on-app-start">
348+
349+
A boolean value that determines whether the app start process will be profiled. When true, the startup process, including ContentProviders, Application and first Activity creation, will be profiled. Note that <PlatformIdentifier name="profile-session-sample-rate" /> must be defined.
350+
351+
- If profileLifecycle is set to `manual`: profiling is started automatically on startup and stopProfiler must be called manually whenever the app startup is deemed to be completed
352+
- If profileLifecycle is set to `trace`: profiling is started automatically on startup, and will automatically be stopped when the root span that is associated with app startup ends
353+
354+
</ConfigKey>

docs/platforms/android/index.mdx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,20 @@ The wizard will prompt you to log in to Sentry. It'll then automatically do the
7575
Configuration is done via the application `AndroidManifest.xml`. Here's an example config which should get you started:
7676

7777

78-
```xml {filename:AndroidManifest.xml} {"onboardingOptions": {"performance": "6-7", "profiling": "8-9", "session-replay": "10-12"}}
78+
```xml {filename:AndroidManifest.xml} {"onboardingOptions": {"performance": "6-7", "profiling": "8-13", "session-replay": "14-16"}}
7979
<application>
8080
<!-- Required: set your sentry.io project identifier (DSN) -->
8181
<meta-data android:name="io.sentry.dsn" android:value="___PUBLIC_DSN___" />
8282
<!-- Add data like request headers, user ip address and device name, see https://docs.sentry.io/platforms/android/data-management/data-collected/ for more info -->
8383
<meta-data android:name="io.sentry.send-default-pii" android:value="true" />
84-
<!-- enable the performance API by setting a sample-rate, adjust in production env -->
84+
<!-- Enable the performance API by setting a sample-rate, adjust in production env -->
8585
<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
86-
<!-- enable profiling when starting transactions, adjust in production env -->
87-
<meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" />
86+
<!-- Enable profiling, adjust in production env. See https://docs.sentry.io/platforms/android/profiling for more info -->
87+
<meta-data android:name="io.sentry.traces.profiling.session-sample-rate" android:value="1.0" />
88+
<!-- Set profiling lifecycle, can be `manual` or `trace` -->
89+
<meta-data android:name="io.sentry.traces.profiling.lifecycle" android:value="manual" />
90+
<!-- Enable profiling on app start -->
91+
<meta-data android:name="io.sentry.traces.profiling.start-on-app-start" android:value="true" />
8892
<!-- record session replays for 100% of errors and 10% of sessions -->
8993
<meta-data android:name="io.sentry.session-replay.on-error-sample-rate" android:value="1.0" />
9094
<meta-data android:name="io.sentry.session-replay.session-sample-rate" android:value="0.1" />
@@ -104,11 +108,15 @@ import io.sentry.Sentry;
104108
public class MyActivity extends AppCompatActivity {
105109
protected void onCreate(Bundle savedInstanceState) {
106110
super.onCreate(savedInstanceState);
111+
// Any code running after this line will be
112+
//profiled until Sentry.stopProfiler() is called.
113+
Sentry.startProfiler();
107114
try {
108115
throw new Exception("This is a test.");
109116
} catch (Exception e) {
110117
Sentry.captureException(e);
111118
}
119+
Sentry.stopProfiler();
112120
}
113121
}
114122
```
@@ -121,11 +129,15 @@ import io.sentry.Sentry
121129
class MyActivity : AppCompatActivity() {
122130
override fun onCreate(savedInstanceState: Bundle?) {
123131
super.onCreate(savedInstanceState)
132+
// Any code running after this line will be
133+
//profiled until Sentry.stopProfiler() is called.
134+
Sentry.startProfiler()
124135
try {
125136
throw Exception("This is a test.")
126137
} catch (e: Exception) {
127138
Sentry.captureException(e)
128139
}
140+
Sentry.stopProfiler()
129141
}
130142
}
131143
```

0 commit comments

Comments
 (0)