Skip to content

Commit 14aab2d

Browse files
committed
Merge branch 'master' of github.com:getsentry/sentry-docs into smi/quick-start/nextjs
2 parents 4712da1 + 374e8b1 commit 14aab2d

File tree

45 files changed

+604
-403
lines changed

Some content is hidden

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

45 files changed

+604
-403
lines changed

app/layout.tsx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {Theme} from '@radix-ui/themes';
44
import type {Metadata} from 'next';
55
import {Rubik} from 'next/font/google';
66
import Script from 'next/script';
7+
import PlausibleProvider from 'next-plausible';
78

89
import {ThemeProvider} from 'sentry-docs/components/theme-provider';
910

@@ -31,6 +32,9 @@ export const metadata: Metadata = {
3132
export default function RootLayout({children}: {children: React.ReactNode}) {
3233
return (
3334
<html lang="en" suppressHydrationWarning>
35+
<head>
36+
<PlausibleProvider domain="docs.sentry.io,rollup.sentry.io" />
37+
</head>
3438
<body className={rubik.variable} suppressHydrationWarning>
3539
<ThemeProvider
3640
attribute="class"
@@ -42,26 +46,20 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
4246
{children}
4347
</Theme>
4448
</ThemeProvider>
49+
<Script
50+
async
51+
src="https://widget.kapa.ai/kapa-widget.bundle.js"
52+
data-website-id="cac7cc70-969e-4bc1-a968-55534a839be4"
53+
data-button-hide // do not render kapa ai button
54+
data-modal-override-open-class="kapa-ai-class" // all elements with this class will open the kapa ai modal
55+
data-project-name="Sentry"
56+
data-project-color="#6A5FC1"
57+
data-project-logo="https://avatars.githubusercontent.com/u/1396951?s=280&v=4"
58+
data-font-family="var(--font-rubik)"
59+
data-modal-disclaimer="Disclaimer: Welcome to our knowledge search bot! While we'd love to be able to answer all your questions, please remember this is a tool for searching our publicly available sources and not a support forum. Don't include any sensitive or personal information in your queries. For more on how Sentry handles your data, see our [Privacy Policy](https://sentry.io/privacy/). This form is protected by reCAPTCHA. Google's Privacy Policy and Google's Terms of Service apply."
60+
data-modal-example-questions="How to set up Sentry for Next.js?,What are tracePropagationTargets?"
61+
/>
4562
</body>
46-
<Script
47-
defer
48-
data-domain="docs.sentry.io,rollup.sentry.io"
49-
data-api="https://plausible.io/api/event"
50-
src="https://plausible.io/js/script.tagged-events.js"
51-
/>
52-
<Script
53-
async
54-
src="https://widget.kapa.ai/kapa-widget.bundle.js"
55-
data-website-id="cac7cc70-969e-4bc1-a968-55534a839be4"
56-
data-button-hide // do not render kapa ai button
57-
data-modal-override-open-class="kapa-ai-class" // all elements with this class will open the kapa ai modal
58-
data-project-name="Sentry"
59-
data-project-color="#6A5FC1"
60-
data-project-logo="https://avatars.githubusercontent.com/u/1396951?s=280&v=4"
61-
data-font-family="var(--font-rubik)"
62-
data-modal-disclaimer="Disclaimer: Welcome to our knowledge search bot! While we'd love to be able to answer all your questions, please remember this is a tool for searching our publicly available sources and not a support forum. Don't include any sensitive or personal information in your queries. For more on how Sentry handles your data, see our [Privacy Policy](https://sentry.io/privacy/). This form is protected by reCAPTCHA. Google's Privacy Policy and Google's Terms of Service apply."
63-
data-modal-example-questions="How to set up Sentry for Next.js?,What are tracePropagationTargets?"
64-
/>
6563
</html>
6664
);
6765
}

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,6 @@ To run the test locally, run `pytest` with `--migrations` flag. For example, `py
9191

9292
If you would like to speed up the migration tests and do not require rebuilding the databases on each test run, supply `--reuse-db` as an additional option to the test command.
9393

94-
### Backup Testing
95-
When you add or change a model, an error message in CI may appear explaining that one or multiple tests "produced an `export.json` backup file that was missing the above models".
96-
In order to resolve this, there are two steps:
97-
1. Add the new or modified model to the exhaustive organization in [testutils/helpers/backups.py](https://github.com/getsentry/sentry/blob/f9e6aa610340fd41cc13490aeda71b06bbc933c2/src/sentry/testutils/helpers/backups.py#L366) by creating an instance of your model, for example by invoking MyModel.objects.create(). This ensures the presence of the new model when creating the snapshot and during testing.
98-
2. The snapshot files can be regenerated using the following command:
99-
```
100-
SENTRY_SNAPSHOTS_WRITEBACK=1 pytest tests/sentry/backup/test_sanitize.py
101-
```
102-
103-
There are also tests for model dependencies that make use of automatically generated fixtures in tests/sentry/backup/test_dependencies.py. These tests will fail if they are not updated when a new model with dependencies on other models is added, or dependencies are modified. In order to re-generate the model dependency graphs, you can run [bin/generate-model-dependency-fixtures](https://github.com/getsentry/sentry/blob/f9e6aa610340fd41cc13490aeda71b06bbc933c2/bin/generate-model-dependency-fixtures).
104-
10594
#### Notes
10695

10796
- There is a [known issue](https://github.com/getsentry/sentry/blob/e4627f093de4718e054ba9c6b002ff0b9a5b6033/tests/sentry/migrations/test_0295_backfill_alertrule_type.py#L1-L3) with the `django-pg-zero-downtime-migrations` package which causes the roll back of a `NOT NULL` constraint to fail.

develop-docs/sdk/expected-features/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Whenever possible, avoid adding the attachment altogether if taking the screensh
225225

226226
## Before-Send Hook
227227

228-
Hook called with the event (and on some platforms the hint) that allows the user to decide whether an event should be sent or not. This can also be used to further modify the event. This only works for `error` events. For `transactions` it is recommended to have `beforeSendTransaction` implemented in SDKs.
228+
Hook called with the event (and on some platforms the hint) that allows the user to decide whether an event should be sent or not. This can also be used to further modify the event. This only works for `error` events. For `transactions` it is recommended to have `beforeSendTransaction` implemented in SDKs. To understand when you should call this in your SDK, please refer to the [error filter ordering of sessions](/sdk/telemetry/sessions/#filter-order).
229229

230230
## Before-Breadcrumb Hook
231231

develop-docs/sdk/platform-specifics/python-sdk/feature-branches.mdx renamed to develop-docs/sdk/miscellaneous/feature-branches.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: How-to for syncing long-running feature branches.
44
sidebar_order: 30
55
---
66

7-
Sometimes we have long-running feature branches that can't be merged into `master` yet because they contain breaking changes (e.g. `sentry-sdk-2.0`, `potel-base`). They have to be kept in sync with `master` though.
7+
Sometimes we have long-running feature branches that can't be merged into `master` yet because they contain breaking changes (e.g. `sentry-sdk-2.0`, `potel-base` in python SDK, `8.x.x` in Java SDK). They have to be kept in sync with `master`/`main` though.
88

99
You might be tempted to branch off the feature branch and do the merge there, maybe make a PR so that you can double check the changes in the UI and make sure CI is green. In that case you need to make sure you **don't actually commit the merge from another branch** — the merge commit needs to be directly on the feature branch, otherwise `git` doesn't set the parent commits for the merge commit properly and the feature branch will still have unresolved conflicts (even though you literally just resolved them).
1010

@@ -20,3 +20,19 @@ If you still want the nice GH diff and have CI run on your changes:
2020
- push the new branch, make a PR, look at the nice diff in GitHub, see if the tests pass
2121
- if everything looks ok: don't merge the PR! this will not mark the merge conflicts as solved
2222
- instead, `git checkout` your feature branch (with the merge commit on top) and `push` it
23+
24+
## Alternative solution A (used for Java SDK `8.x.x` branch)
25+
26+
This does not show the full history on each file. The history only works on the full repo. Please try another method.
27+
28+
- Create a PR for merging `main` into `8.x.x`
29+
- Once that PR is merged into `8.x.x` there will still be conflicts shown in the PR for merging `8.x.x` back to `main`
30+
- Do another merge of `main` into `8.x.x` where you accept all changes on the `8.x.x` branch and create an empty merge commit
31+
- NOTE: If there are new commits on `main` this won't work correctly
32+
33+
34+
## Alternative solution B (untested)
35+
36+
- Create a merge PR for merging `main` into e.g. `8.x.x`
37+
- When merging the PR do not squash but create a merge commit (might have to enable this in repo settings first)
38+
- If someone tests this, please update the docs here

develop-docs/sdk/telemetry/traces/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ The random value is set according to the following rules:
236236
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.
237237
3. On incoming traces, an SDK assumes the `sample_rand` value along with the rest of the DSC, overriding an existing value if needed.
238238
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:
239-
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]`.
239+
1. If `sample_rate` and the sampling decision (from the `sentry-trace` header) 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]`.
240240
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.
241241

242242
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:

develop-docs/self-hosted/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ To apply new Docker daemon configuration, restart your Docker service with `syst
123123

124124
<Alert title="Note" level="info">
125125
The value `172.17.0.0/16` is the default IP pools for Docker. If you are customizing your Docker default IP pools, please modify the value accordingly.
126-
Further information regarding Docker default IP pools can be found on the [Troubleshooting guide](/self-hosted/troubleshooting/#docker-network-conflicting-ip-address).
126+
Further information regarding Docker default IP pools can be found on the [Troubleshooting guide](/self-hosted/troubleshooting/docker/#docker-network-conflicting-ip-address).
127127
</Alert>
128128

129129
## Configuration

0 commit comments

Comments
 (0)