Skip to content

Commit a5d2063

Browse files
committed
Merge branch 'master' of github.com:getsentry/sentry-docs into smi/nestjs/rework-installation-methods
2 parents de50475 + 725460a commit a5d2063

File tree

74 files changed

+689
-155
lines changed

Some content is hidden

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

74 files changed

+689
-155
lines changed

app/api/ip-ranges/ip-ranges.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"data": {
3+
"dashboard": {
4+
"sentry_io": [
5+
"35.186.247.156/32"
6+
],
7+
"us_sentry_io": [
8+
"35.186.247.156/32"
9+
],
10+
"de_sentry_io": [
11+
"34.36.122.224/32",
12+
"34.36.87.148/32"
13+
]
14+
},
15+
"event_ingestion": {
16+
"apex_domain": [
17+
"35.186.247.156/32"
18+
],
19+
"organization_subdomains": {
20+
"us": [
21+
"34.120.195.249/32"
22+
],
23+
"eu": [
24+
"34.120.62.213/32",
25+
"130.211.36.74/32"
26+
]
27+
},
28+
"legacy": [
29+
"34.96.102.34/32"
30+
]
31+
},
32+
"outbound_requests": {
33+
"us": [
34+
"35.184.238.160/32",
35+
"104.155.159.182/32",
36+
"104.155.149.19/32",
37+
"130.211.230.102/32"
38+
],
39+
"eu": [
40+
"34.141.31.19/32",
41+
"34.141.4.162/32",
42+
"35.234.78.236/32"
43+
]
44+
},
45+
"email_delivery": [
46+
"167.89.86.73",
47+
"167.89.84.75",
48+
"167.89.84.14"
49+
],
50+
"uptime_monitoring": [
51+
"34.123.33.225",
52+
"34.41.121.171",
53+
"34.169.179.115",
54+
"35.237.134.233",
55+
"34.85.249.57",
56+
"34.159.197.47",
57+
"35.242.231.10",
58+
"34.107.93.3",
59+
"35.204.169.245"
60+
]
61+
}
62+
}

app/api/ip-ranges/route.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// these ranges are a copy of docs/security-legal-pii/security/ip-ranges.mdx
2+
import ipRanges from './ip-ranges.json';
3+
4+
// 12h
5+
const CACHE_DURATION = 12 * 60 * 60;
6+
7+
export function GET() {
8+
const headers = new Headers({
9+
'Content-Type': 'application/json',
10+
'Cache-Control': `public, max-age=${CACHE_DURATION}`,
11+
'X-Content-Type-Options': 'nosniff',
12+
'X-Frame-Options': 'DENY',
13+
'X-XSS-Protection': '1; mode=block',
14+
});
15+
16+
return Response.json(ipRanges, {status: 200, headers});
17+
}

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
3333
return (
3434
<html lang="en" suppressHydrationWarning>
3535
<head>
36-
<PlausibleProvider domain="docs.sentry.io,rollup.sentry.io" />
36+
<PlausibleProvider taggedEvents domain="docs.sentry.io,rollup.sentry.io" />
3737
</head>
3838
<body className={rubik.variable} suppressHydrationWarning>
3939
<ThemeProvider

develop-docs/backend/application-domains/kafka.mdx

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,36 @@ title: Kafka consumers
33
sidebar_order: 60
44
---
55

6-
## Creating a new consumer in Sentry
6+
## Create a new Kafka topic
77

8-
WIP! This is currently just a checklist.
8+
1. Add the topic to the `KAFKA_TOPIC_TO_CLUSTER` in [src/sentry/conf/server.py](https://github.com/getsentry/sentry/blob/master/src/sentry/conf/server.py):
9+
* e.g. `subscription-results-eap-items`
10+
2. Add the topic to `Topic` in [src/sentry/conf/types/kafka_definition.py](https://github.com/getsentry/sentry/blob/master/src/sentry/conf/types/kafka_definition.py)
11+
12+
## Define or re-use a processing strategy
13+
14+
In most cases a [Streaming Factory](https://getsentry.github.io/arroyo/getstarted.html#create-a-streaming-consumer) is what you want to when defining a consumer (see next section). You can find examples of it in [Sentry's code base](https://github.com/search?q=repo%3Agetsentry%2Fsentry+%28ProcessingStrategyFactory&type=code).
15+
16+
## Define a new Kafka consumer
917

1018
1. Add a new entry in the `KAFKA_CONSUMERS` key in
11-
`src/sentry/consumers/__init__.py`.
19+
[src/sentry/consumers/__init__.py](https://github.com/getsentry/sentry/blob/master/src/sentry/consumers/__init__.py):
20+
```python
21+
KAFKA_CONSUMERS = {
22+
"<your_topic_str_here>": {
23+
"topic": Topic.YOUR_TOPIC,
24+
"strategy_factory": "sentry_package_defining_your_strategy_factory_class",
25+
}
26+
}
27+
```
28+
2. You may need optional properties (e.g. `click_options`, you will need to research them by looking at [ConsumerDefinition](https://github.com/getsentry/sentry/blob/master/src/sentry/conf/types/kafka_definition.py)'s code.
1229

13-
2. Create ops PR for adding your consumer to
14-
`k8s/services/getsentry/consumer-deployment.yaml`.
30+
3. Make sure you can run it: `sentry run consumer <your_topic>`
31+
4. You may need to add some devserver options [here](https://github.com/getsentry/sentry/blob/master/src/sentry/runner/commands/devserver.py).
32+
4. Add tests for your consumer
1533

16-
3. In the Sentry Consumers metrics dashboard, add a new saved view for your
17-
consumer.
34+
## Run the consumer in production
35+
1. Discuss it with SRE during their office hours
36+
2. Create ops PR for adding your consumer to
37+
[k8s/services/getsentry/_consumer-deployment.yaml.j2](https://github.com/getsentry/ops/blob/master/k8s/services/getsentry/_consumer-deployment.yaml.j2).
38+
3. In the [Sentry Consumers metrics dashboard](https://www.notion.so/sentry/Kafka-e8b4f93595684c97b01fe831fbceb0dc?pvs=4#1fa8b10e4b5d8044859ecaf559463cb0), add a new saved view for your consumer.

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,22 @@ For instance:
5353
Related to this, wizards should [check the git status](#1-check-preconditions) of the project and warn users if they're not in a clean state.
5454
This ensures that users can revert the changes easily if something goes wrong.
5555

56-
### Cater to the 80%
56+
### Respect Users' decisions
57+
58+
Wizards should allow users to select the high-level Sentry features (e.g. tracing, replay, profiling) they want to install.
59+
The SDK setup should be minimal, may be opinionated ("whatever makes sense for the platform") but
60+
must respect users' decisions.
5761

58-
Wizards should be opinionated in which SDK options are set and cater to the 80% use case.
59-
The SDK setup doesn't necessarily have to be minimal.
60-
For example, it can include optional but recommended integrations (e.g. session replay or profiling) or options (e.g. sample rates).
62+
Some examples:
63+
- We should not enable a feature that users previously declined (e.g. set `tracesSampleRate` if users previously declined to enable tracing)
64+
- We may set additional options, like the `tunnelRoute` option in Next.Js, but we should ask for consent whenever reasonable. In this example, consent is important because setting this option potentially increases users' traffic and hence their infrastructure bill.
65+
- We may set additional options like `tracePropagationTargets` or `sendDefaultPii` as comments, if we think that these are options users should be aware of.
66+
67+
### Cater to the 80%
6168

6269
Given that most wizards will actively modify code or config files, there is a chance that they might fail or break something.
63-
That's okay and expected as long as we're transparent about it and we tell users upfront that we're touching their files.
64-
We cannot possibly cover all edge cases but we should try to cover the 80% so that typical projects can be set up with the wizard.
70+
That's okay and expected as long as we're transparent about it and we tell users upfront that we're modifying their files.
71+
We cannot possibly cover all edge cases but we should try to cover the 80% so that typical projects can be set up successfully.
6572

6673
### Support Self-Hosted Sentry
6774

develop-docs/sdk/telemetry/logs.mdx

Lines changed: 89 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -268,33 +268,39 @@ An SDK should implement [Tracing without Performance](/sdk/telemetry/traces/trac
268268

269269
### Default Attributes
270270

271-
By default the SDK should set the following attributes:
271+
By default the SDK should attach the following attributes to a log:
272272

273-
1. `sentry.message.template`: The parameterized template string
274-
2. `sentry.message.parameter.X`: The parameters to the template string. X can either be the number that represent the parameter's position in the template string (`sentry.message.parameter.0`, `sentry.message.parameter.1`, etc) or the parameter's name (`sentry.message.parameter.item_id`, `sentry.message.parameter.user_id`, etc)
275-
3. `sentry.environment`: The environment set in the SDK
276-
4. `sentry.release`: The release set in the SDK
277-
5. `sentry.trace.parent_span_id`: The span id of the span that was active when the log was collected. This should not be set if there was no active span.
278-
6. `sentry.sdk.name`: The name of the SDK that sent the log
279-
7. `sentry.sdk.version`: The version of the SDK that sent the log
280-
8. [BACKEND SDKS ONLY] `server.address`: The address of the server that sent the log. Equivalent to `server_name` we attach to errors and transactions.
281-
282-
Example:
273+
1. `sentry.environment`: The environment set in the SDK if defined.
274+
2. `sentry.release`: The release set in the SDK if defined.
275+
3. `sentry.trace.parent_span_id`: The span id of the span that was active when the log was collected. This should not be set if there was no active span.
276+
4. `sentry.sdk.name`: The name of the SDK that sent the log
277+
5. `sentry.sdk.version`: The version of the SDK that sent the log
283278

284279
```json
285280
{
286-
"sentry.message.template": "Adding item %s for user %s",
287-
"sentry.message.parameter.0": "item_id",
288-
"sentry.message.parameter.1": "user_id",
289281
"sentry.environment": "production",
290282
"sentry.release": "1.0.0",
291283
"sentry.trace.parent_span_id": "b0e6f15b45c36b12",
292284
"sentry.sdk.name": "sentry.javascript.node",
293-
"sentry.sdk.version": "9.11.0",
294-
"server.address": "foo.example.com"
285+
"sentry.sdk.version": "9.11.0"
295286
}
296287
```
297288

289+
If the log was paramaterized the SDK should attach the following
290+
291+
1. `sentry.message.template`: The parameterized template string
292+
2. `sentry.message.parameter.X`: The parameters to the template string. X can either be the number that represent the parameter's position in the template string (`sentry.message.parameter.0`, `sentry.message.parameter.1`, etc) or the parameter's name (`sentry.message.parameter.item_id`, `sentry.message.parameter.user_id`, etc)
293+
294+
```json
295+
{
296+
"sentry.message.template": "Adding item %s for user %s",
297+
"sentry.message.parameter.0": "item_id",
298+
"sentry.message.parameter.1": "user_id"
299+
}
300+
```
301+
302+
#### SDK Integration Attributes
303+
298304
If a log is generated by an SDK integration, the SDK should also set the `sentry.origin` attribute, as per the [Trace Origin](/sdk/telemetry/traces/trace-origin/) documentation. It is assumed that logs without a `sentry.origin` attribute are manually created by the user.
299305

300306
```json
@@ -303,7 +309,73 @@ If a log is generated by an SDK integration, the SDK should also set the `sentry
303309
}
304310
```
305311

306-
Beyond these attributes, we are exploring if the SDK should also send OS, user, and device information automatically (via reading the appropriate contexts from the scope). Given this behaviour can easily be added as a new feature to the SDK, it does not have to be part of the initial SDK implementation until we make a finalized decision.
312+
#### User Attributes
313+
314+
If `sendDefaultPii`/`send_default_pii` is set to `true` in the SDK, the SDK should attach the following user data if available:
315+
316+
1. `user.id`: The user ID. Maps to `id` in the [User](/sdk/data-model/event-payloads/user/) payload.
317+
2. `user.name`: The username. Maps to `username` in the [User](/sdk/data-model/event-payloads/user/) payload.
318+
3. `user.email`: The email address. Maps to `email` in the [User](/sdk/data-model/event-payloads/user/) payload.
319+
320+
```json
321+
{
322+
"user.id": "123",
323+
"user.name": "john.doe",
324+
"user.email": "[email protected]"
325+
}
326+
```
327+
328+
#### User Agent Parsing
329+
330+
By default, Relay should parse the user agent attached to an incoming log envelope to parse `browser` and `os` information for logs. These attributes should be attached by Relay, but SDKs can attach them if they do not forward a user agent when sending logs to Sentry.
331+
332+
1. `browser.name`: Display name of the browser application. Maps to `name` in the [Contexts](/sdk/data-model/event-payloads/contexts/#browser-context) payload.
333+
2. `browser.version`: Version string of the browser. Maps to `version` in the [Contexts](/sdk/data-model/event-payloads/contexts/#browser-context) payload.
334+
335+
```json
336+
{
337+
"browser.name": "Chrome",
338+
"browser.version": "120.0"
339+
}
340+
```
341+
342+
#### Backend SDKs
343+
344+
For backend SDKs (Node.js, Python, PHP, etc.), the SDKs should attach the following:
345+
346+
1. `server.address`: The address of the server that sent the log. Equivalent to [`server_name`](sdk/data-model/event-payloads/#optional-attributes) we attach to errors and transactions.
347+
348+
```json
349+
{
350+
"server.address": "foo.example.com"
351+
}
352+
```
353+
354+
#### Mobile, Desktop, and Native SDKs
355+
356+
For mobile, desktop, and native SDKs (Android, Apple, Electron, etc.), the SDKs should attach the following:
357+
358+
1. `os.name`: The name of the operating system. Maps to `name` in the [Contexts](/sdk/data-model/event-payloads/contexts/#os-context) payload.
359+
2. `os.version`: The version of the operating system. Maps to `version` in the [Contexts](/sdk/data-model/event-payloads/contexts/#os-context) payload.
360+
3. `device.brand`: The brand of the device. Maps to `brand` in the [Contexts](/sdk/data-model/event-payloads/contexts/#device-context) payload.
361+
4. `device.model`: The model of the device. Maps to `model` in the [Contexts](/sdk/data-model/event-payloads/contexts/#device-context) payload.
362+
5. `device.family`: The family of the device. Maps to `family` in the [Contexts](/sdk/data-model/event-payloads/contexts/#device-context) payload.
363+
364+
```json
365+
{
366+
"os.name": "iOS",
367+
"os.version": "17.0",
368+
"device.brand": "Apple",
369+
"device.model": "iPhone 15 Pro Max",
370+
"device.family": "iPhone"
371+
}
372+
```
373+
374+
#### Future Default Attributes
375+
376+
The SDKs should aim to minimize the number of default attributes attached to a log. Logs are intended to be lightweight, and we want to try to keep the average byte size of a log as small as possible as users will be charged per byte size of logs sent.
377+
378+
We are trying to settle on a balance of debuggability vs. smaller byte size for logs which is why new default attributes should only be added after significant feedback from users and discussion internally with the SDK and ingest teams. There is no hard rule about what exact attributes are allowed, every proposed new attribute will be evaluated on a case-by-case basis.
307379

308380
### Data Category and Rate Limiting
309381

docs/cli/installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can find the list of releases on [the GitHub release page](https://github.co
1212

1313
## Automatic Installation
1414

15-
If you are on OS X or Linux, you can use the automated downloader which will fetch the latest release version for you and install it:
15+
If you are on macOS or Linux, you can use the automated downloader which will fetch the latest release version for you and install it:
1616

1717
```bash
1818
curl -sL https://sentry.io/get-cli/ | sh

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ The event or replay id. In **Issues**, use only the ID value without the `id` ke
190190

191191
- **Type:** UUID
192192

193+
### `is_archived`
194+
195+
Whether the replay has been archived.
196+
197+
- **Type:** boolean
198+
193199
### `level`
194200

195201
Severity of the event (such as: fatal, error, warning). Always set to info for transactions.

docs/organization/integrations/compliance/vanta-eu/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Sentry Owner, Manager, or Admin permissions are required to install this integra
1818

1919
1. Navigate to **Settings > Integrations > Vanta EU**
2020

21-
2. Follow the full [Vanta installation instructions](https://help.vanta.com/hc/en-us/articles/13045851267092).
21+
2. Follow the full [Vanta installation instructions](https://help.vanta.com/en/articles/11345687-vanta-sentry-integration).

docs/organization/integrations/compliance/vanta/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Sentry owner, manager, or admin permissions are required to install this integra
1616

1717
1. Navigate to **Settings > Integrations > Vanta**
1818

19-
2. Follow the full [Vanta installation instructions](https://help.vanta.com/hc/en-us/articles/13045851267092).
19+
2. Follow the full [Vanta installation instructions](https://help.vanta.com/en/articles/11345687-vanta-sentry-integration).

0 commit comments

Comments
 (0)