Skip to content

Commit cfe959e

Browse files
committed
Merge branch 'master' of https://github.com/getsentry/sentry-docs into revert-12296-aliu/unpublish-unleash
2 parents 76c4010 + 69e8a1d commit cfe959e

File tree

16 files changed

+302
-266
lines changed

16 files changed

+302
-266
lines changed

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/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

develop-docs/self-hosted/troubleshooting.mdx

Lines changed: 0 additions & 252 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Troubleshooting Docker
3+
sidebar_title: Docker
4+
sidebar_order: 3
5+
---
6+
7+
## Container Healthcheck
8+
9+
There may be some circumstances which you may want to increase or decrease healthcheck interval, timeout or retries for your custom needs. This can be achieved by editing `HEALTHCHECK_INTERVAL`, `HEALTHCHECK_TIMEOUT`, `HEALTHCHECK_RETRIES` variables' values in `.env`.
10+
11+
Occasionally, you might see an error like this
12+
```
13+
container for service "${servicename}" is unhealthy
14+
```
15+
16+
This can usually be resolved by running `docker compose down` and `docker compose up --wait` or rerunning the install script.
17+
18+
## Docker Network Conflicting IP Address
19+
20+
Self-hosted Sentry is using Docker's bridge networking, in which use a specific private IP range. By default, Docker uses `172.17.0.0/16` range (`172.17.0.0`-`172.17.255.255`). This may cause conflict with your private network. You can change Docker's default IP range by configuring the `/etc/docker/daemon.json` file. If the file does not exists, you can create it yourself.
21+
22+
Assuming your safe IP range is `10.147.0.0/16` and `10.146.0.0/16`, your configuration would be:
23+
24+
```json
25+
{
26+
"default-address-pools": [
27+
{
28+
"base": "10.147.0.0/16",
29+
"size": 24
30+
},
31+
{
32+
"base": "10.146.0.0/16",
33+
"size": 24
34+
}
35+
]
36+
}
37+
```
38+
39+
To apply new Docker daemon configuration, restart your Docker service with `systemctl restart docker`.
40+
41+
Make sure you are using [valid private IP ranges](https://en.wikipedia.org/wiki/Reserved_IP_addresses), that is between these ranges:
42+
- `10.0.0.0/8` (address range of `10.0.0.0``10.255.255.255`)
43+
- `100.64.0.0/10` (address range of `100.64.0.0``100.127.255.255`)
44+
- `172.16.0.0/12` (address range of `172.16.0.0``172.31.255.255`)
45+
- `192.0.0.0/24` (address range of `192.0.0.0``192.0.0.255`)
46+
- `192.168.0.0/16` (address range of `192.168.0.0``192.168.255.255`)
47+
- `198.18.0.0/15` (address range of `198.18.0.0``198.19.255.255`)
48+
49+
For further reading, you can see Matthew Stratiotto's article on [The definitive guide to docker's default-address-pools option](https://straz.to/2021-09-08-docker-address-pools/).
50+
51+
## Logs Disk Usage
52+
53+
If you are suspecting persisted logs from Docker container logs consumes a lot of your disk space, you can configure the amount of persisted logs on Docker by configuring the `/etc/docker/daemon.json` file. If the file does not exists, you can create it yourself.
54+
55+
```json
56+
{
57+
"log-driver": "local",
58+
"log-opts": {"max-size": "10m", "max-file": "3"}
59+
}
60+
```
61+
62+
To apply new Docker daemon configuration, restart your Docker service with `systemctl restart docker`.
63+
64+
If you want to delete immediate Docker logs, you can execute this as `root` user:
65+
66+
```shell
67+
truncate -s 0 /var/lib/docker/containers/**/*-json.log
68+
```
69+
70+
## Image and Builder Cleanup
71+
72+
Executing `./install.sh` will build a new Sentry Docker container, executing it often might cause Docker to consume your disk space. You can safely prune old or unneeded Docker containers, image, or builder to re-acquire used disk space. Executing these will not affect current running containers and volumes.
73+
74+
```shell
75+
docker container prune
76+
docker builder prune
77+
docker image prune --all
78+
# WARNING: Executing "volume prune" might delete `sentry-vroom` volume as it's not an external volume.
79+
docker volume prune
80+
docker network prune
81+
```
82+
83+
Append `-f` flag for no confirmation on deletions.

0 commit comments

Comments
 (0)