Skip to content

Commit 31d99de

Browse files
authored
Merge branch 'master' into cg/fix-404-issuespage
2 parents a47a253 + 8475e48 commit 31d99de

File tree

113 files changed

+452
-133
lines changed

Some content is hidden

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

113 files changed

+452
-133
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212
"git.ignoreLimitWarning": true,
1313
"search.exclude": {
1414
"**/src/wizard/**": true
15-
}
15+
},
16+
"cSpell.words": [
17+
"laravel"
18+
]
1619
}

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,14 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
200200
: domain;
201201
let title =
202202
'Sentry Docs | Application Performance Monitoring &amp; Error Tracking Software';
203-
let customCanonicalTag;
203+
let customCanonicalTag: string = '';
204204
let description =
205205
'Self-hosted and cloud-based application performance monitoring &amp; error tracking that helps software teams see clearer, solve quicker, &amp; learn continuously.';
206-
const images = [{url: `${previewDomain ?? domain}/meta.jpg`, width: 1200, height: 822}];
206+
// show og image on the home page only
207+
const images =
208+
((await props.params).path ?? []).length === 0
209+
? [{url: `${previewDomain ?? domain}/og.png`, width: 1200, height: 630}]
210+
: [];
207211

208212
const rootNode = await getDocsRootNode();
209213

app/globals.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,8 @@ body {
160160
opacity: 1;
161161
}
162162
}
163+
164+
#kapa-widget-portal a[href="https://sentry.io/privacy/"]
165+
{
166+
color: rgb(134, 142, 150) !important;
167+
}

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
5656
data-project-color="#6A5FC1"
5757
data-project-logo="https://avatars.githubusercontent.com/u/1396951?s=280&v=4"
5858
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."
59+
data-modal-disclaimer="Please note: This is a tool that searches publicly available sources. Do not 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/)."
6060
data-modal-example-questions="How to set up Sentry for Next.js?,What are tracePropagationTargets?"
6161
/>
6262
</body>

apps/changelog/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"next": "15.1.2",
3030
"next-auth": "^4.24.5",
3131
"next-mdx-remote": "^4.4.1",
32+
"next-plausible": "^3.12.4",
3233
"nextjs-toploader": "^1.6.6",
3334
"nuqs": "^1.17.7",
3435
"prism-sentry": "^1.0.2",
@@ -66,4 +67,4 @@
6667
"@types/react": "npm:[email protected]",
6768
"@types/react-dom": "npm:[email protected]"
6869
}
69-
}
70+
}

apps/changelog/src/app/layout.tsx

Lines changed: 4 additions & 6 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
const rubik = Rubik({
910
weight: ['400', '500', '700'],
@@ -33,17 +34,14 @@ export const metadata: Metadata = {
3334
export default function RootLayout({children}: {children: React.ReactNode}) {
3435
return (
3536
<html lang="en">
37+
<head>
38+
<PlausibleProvider domain="changelog.sentry.io" />
39+
</head>
3640
<body className={`${rubik.variable}`}>
3741
<Theme accentColor="iris" grayColor="sand" radius="large" scaling="95%">
3842
{children}
3943
</Theme>
4044
</body>
41-
<Script
42-
defer
43-
data-domain="docs.sentry.io,rollup.sentry.io"
44-
data-api="https://plausible.io/api/event"
45-
src="https://plausible.io/js/script.tagged-events.js"
46-
/>
4745
</html>
4846
);
4947
}

develop-docs/sdk/expected-features/data-handling.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Some examples of data guarded by this flag:
2323
- On desktop applications
2424
- The username logged in the device is not included. This is often a person's name.
2525
- The machine name is not included, for example `Bruno's laptop`
26-
- SDKs don't set `{{auto}}` as `user.ip`. This instructs the server to keep the connection's IP address.
26+
- SDKs don't set `{{auto}}` as `user.ip_address`. This instructs the server to keep the connection's IP address.
2727
- Server SDKs remove the IP address of incoming HTTP requests.
2828

2929
Sentry server is always aware of the connecting IP address and can use it for logging in some platforms. Namely JavaScript and iOS/macOS/tvOS.
30-
All other platforms require the event to include `user.ip={{auto}}` which happens if `sendDefaultPii` is set to true.
30+
All other platforms require the event to include `user.ip_address={{auto}}` which happens if `sendDefaultPii` is set to true.
3131

3232
Before sending events to Sentry, the SDKs should invokes callbacks. That allows users to remove any sensitive data client-side.
3333

@@ -63,12 +63,16 @@ This helps Relay to know what kind of data it receives and this helps with scrub
6363
If query strings are present in the URL or fragments (Browser SDKs only) are present in the URI, both are set into the data attribute of the span.
6464

6565
```js
66-
span.setData({
66+
span.setAttributes({
6767
"http.query": url.getQuery(),
6868
"http.fragment": uri.getFragment(),
6969
});
7070
```
7171

72+
```python
73+
span.set_data("http.query", query)
74+
```
75+
7276
Additionally all semantic conventions of OpenTelementry for http spans should be set in the `span.data` if applicable:
7377
https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/
7478

@@ -86,7 +90,7 @@ If the `message` in a breadcrumb contains an URL it should be formatted the same
8690
If query strings are present in the URL or fragments (Browser SDKs only) are present in the URI, both should also be set in the data attribute like with `http` spans.
8791

8892
```js
89-
getCurrentHub().addBreadcrumb({
93+
Sentry.addBreadcrumb({
9094
type: "http",
9195
category: "xhr",
9296
data: {

develop-docs/sdk/miscellaneous/feature-branches.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ If you still want the nice GH diff and have CI run on your changes:
2323

2424
## Alternative solution A (used for Java SDK `8.x.x` branch)
2525

26+
This does not show the full history on each file. The history only works on the full repo. Please try another method.
27+
2628
- Create a PR for merging `main` into `8.x.x`
2729
- 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`
2830
- 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

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

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -228,24 +228,23 @@ A transaction's sampling decision should be passed to all of its children, inclu
228228

229229
To improve the likelihood of capturing complete traces when backend services use a custom sample rate via `tracesSampler`, the SDK propagates the same random value used for sampling decisions across all services in a trace. This ensures consistent sampling decisions across a trace instead of generating a new random value for each service.
230230

231-
If no `tracesSampler` callback is used, the SDK fully inherits sampling decisions for propagated traces, and the presence of `sample_rand` in the DSC doesn't affect the decision. However, this behavior may change in the future.
231+
The random value (`sample_rand`) is set according to the following rules:
232232

233-
The random value is set according to the following rules:
233+
1. When tracing is enabled and a new trace is started, the SDK generates a `sample_rand` value for the current execution context. A `sample_rand` is a float (`0.1234` notation) in the range of `[0, 1)` (including 0.0, excluding 1.0).
234+
1. 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.
235+
1. The `sample_rand` is part of the DSC (Dynamic Sampling Context) and as with other values on the `baggage` header, the `sample_rand` value from the current execution context should be propagated to downstream SDKs.
236+
1. On incoming traces, an SDK takes the incoming `sentry-sample_rand` value in the `baggage` header and uses it for the rest of the current execution context (e.g. request).
237+
1. If `sample_rand` is missing on an incoming trace, the SDK creates a new one applying **special rules** and uses it for the current execution context:
238+
1. If `sample_rate` (inside `baggage`) and the sampling decision (trailing `-1` or `-0` from the `sentry-trace` header) are present in the incoming trace, create `sample_rand` so that when compared to the incoming `sample_rate` it would lead to the same sampling decision that is in the `sentry-trace` header. 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 the sampling decision is missing on the incoming trace, generate a random number in range of `[0, 1)` (including 0.0, excluding 1.0), like for a new trace.
234240

235-
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`.
236-
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.
237-
3. On incoming traces, an SDK assumes the `sample_rand` value along with the rest of the DSC, overriding an existing value if needed.
238-
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]`.
240-
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.
241+
The SDK should always use the stored random number (`sentry-sample_rand`) for sampling decisions and should not directly rely on `math.random()` when deciding to sample or not:
241242

242-
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:
243+
1. When the `tracesSampler` is invoked, the return value should be compared with `sample_rand`: `trace["sentry-sample_rand"] < tracesSampler(context)`
244+
1. When there is an incoming trace, the SDK fully inherits incoming sampling decisions from the `sentry-trace` header.
245+
1. Otherwise, when the SDK is the head of a trace (and `tracesSampleRate` is defined), the sampling is done comparing the `tracesSampleRate` with the `sample_rand`: `trace["sentry-sample_rand"] < config.tracesSampleRate`
243246

244-
1. When the `tracesSampler` is invoked, this also applies to the return value of traces sampler. That is, `trace["sentry-sample_rand"] < tracesSampler(context)`
245-
2. Otherwise, when the SDK is the head of a trace, this also applies to sample decisions based on `tracesSampleRate`. That is, `trace["sentry-sample_rand"] < config.tracesSampleRate`
246-
3. There is no more direct comparison with `math.random()` during the sampling process.
247-
248-
When using a `tracesSampler`, the proper way to inherit a parent's sampling decision is to return the parent's sample rate, instead of leaving the decision as a float (for example, 1.0). This way, Sentry can still extrapolate counts correctly.
247+
Something that should be documented for every SDK is the recommended way to use a `tracesSampler` to inherit the parent's sampling decision using the `parentSampleRate`. This way, Sentry can still extrapolate counts correctly:
249248

250249
```js
251250
tracesSampler: ({ name, parentSampleRate }) => {

develop-docs/self-hosted/backup.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Self-Hosted Backup & Restore
33
sidebar_title: Backup & Restore
44
sidebar_order: 20
5+
description: Learn how to backup and restore your self-hosted Sentry data using various methods
56
---
67

78
## Partial JSON backup

0 commit comments

Comments
 (0)