Skip to content

Commit 504596d

Browse files
authored
chore(dynamic-sampling): add hint about conditions in dynamic sampling rules (#14303)
1 parent 010e6a2 commit 504596d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

develop-docs/application-architecture/dynamic-sampling/architecture.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ An example of rule encoded in JSON is the following:
5252
}
5353
```
5454

55+
<Alert title="✨ Note">
56+
Dynamic sampling rules must always include a `condition` field, otherwise the entire dynamic sampling ruleset will be ignored by Relay. If you want a rule to match every event, set the condition as follows:
57+
```json
58+
{
59+
"condition": {
60+
"inner": [],
61+
"op": "and"
62+
}
63+
}
64+
```
65+
</Alert>
66+
5567
#### Fetching the Sampling Configuration
5668

5769
The sampling configuration is fetched by Relay from Sentry in a pull fashion. This is done by sending a request to the `/api/0/relays/projectconfigs/` endpoint periodically (defined [here](https://github.com/getsentry/sentry/blob/master/src/sentry/api/endpoints/relay/project_configs.py#L34-L34)).

0 commit comments

Comments
 (0)