Skip to content

Commit e6cf19f

Browse files
Merge branch 'master' into hub-scope-migration
2 parents 21a277f + d92a2eb commit e6cf19f

File tree

40 files changed

+274
-12
lines changed

40 files changed

+274
-12
lines changed

develop-docs/development-infrastructure/environment/index.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ SENTRY_SILO_DEVSERVER=1 SENTRY_SILO_MODE=REGION SENTRY_REGION=us getsentry djang
187187

188188
## Troubleshooting
189189

190-
You might also be interested in <Link to="/development/continuous-integration/#troubleshooting-ci">troubleshooting CI</Link>.
190+
The more up-to-date troubleshooting docs for the internal development environment on MacOS are <Link to="https://www.notion.so/sentry/devenv-troubleshooting-1448b10e4b5d8080ba04f452e33de48d">here</Link>.
191+
192+
You might also be interested in <Link to="/development/continuous-integration/#troubleshooting-ci">Troubleshooting CI</Link>.
191193

192194
---
193195

@@ -210,7 +212,7 @@ following in getsentry:
210212

211213
**Problem:** You see an error that mentions something like `pkg_resources.DistributionNotFound: The 'some_dependency<0.6.0,>=0.5.5' distribution was not found and is required by sentry`
212214

213-
**Solution:** Your virtualenv needs to be updated. Run `make install-py-dev`.
215+
**Solution:** Your virtualenv needs to be updated. Run `devenv sync`.
214216

215217
---
216218

develop-docs/development-infrastructure/python-dependencies.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To add or manually update a dependency:
2323
5. In that repo, add to or update `requirements-base.txt` or `requirements-dev.txt`, as appropriate. Note that many of our dependencies are pinned with lower bounds only, to encourage updating to latest versions, though we do use exact pins for certain core dependencies like `django`. Choose whichever one feels most appropriate in your case.
2424
6. Run `make freeze-requirements`. You might need to wait a few minutes for the changes to `getsentry/pypi` to be deployed before this will work without erroring.
2525
7. Commit your changes (which should consist of changes to both one of the `requirements` files and its corresponding lockfile) to a branch and open a PR in the relevant repo. If it's not obvious, explain why you're adding or updating the dependency. Tag `owners-python-build` if they haven't already been auto-tagged.
26-
8. Merge your PR, pull `master`, and run `make install-py-dev`.
26+
8. Merge your PR, pull `master`, and run `devenv sync`.
2727

2828
To update a dependency using GitHub Actions:
2929

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Filtering
3+
---
4+
5+
<Alert level="warning">
6+
🚧 This document is work in progress.
7+
</Alert>
8+
9+
<Alert level="info">
10+
This document uses key words such as "MUST", "SHOULD", and "MAY" as defined in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) to indicate requirement levels.
11+
</Alert>
12+
13+
The SDK MUST implement a mechanism for users to filter out spans.
14+
The result MUST be binary (`true` or `false`).
15+
Any APIs exposed to the user to filter spans MUST adhere to the following design principles:
16+
17+
- The APIs are optimized for trace completeness
18+
- The APIs are optimized for conclusive sampling decisions
19+
20+
## Filter with `ignoreSpans`
21+
22+
The `ignoreSpans` option accepts a glob pattern or string.
23+
24+
```js
25+
Sentry.init({
26+
ignoreSpans: [
27+
'GET /about',
28+
'events.signal *',
29+
]
30+
})
31+
```
32+
33+
## Filter with `integrations`
34+
35+
The `integrations` option MAY perform in similar fashion as the `ignoreSpans` option, or make explicit opt-out possible via a boolean flag.
36+
37+
```js
38+
Sentry.init({
39+
integrations: [
40+
fsIntegration: {
41+
ignoreSpans: [
42+
'fs.read',
43+
],
44+
readSpans: true,
45+
writeSpans: false,
46+
}
47+
]
48+
})
49+
```
50+
51+
## Other approaches
52+
53+
If both options mentioned above are not feasible to be implemented in certain SDKs, other approaches MUST be explored that have the same outcome.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Spans
3+
sidebar_order: 8
4+
---
5+
6+
<PageGrid />
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Sampling
3+
---
4+
5+
<Alert level="warning">
6+
🚧 This document is work in progress.
7+
</Alert>
8+
9+
<Alert level="info">
10+
This document uses key words such as "MUST", "SHOULD", and "MAY" as defined in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) to indicate requirement levels.
11+
</Alert>
12+
13+
Any APIs exposed to the user to sample spans MUST adhere to the following design principles:
14+
15+
- Sampling MUST only happen to a root span
16+
- The APIs are optimized for trace completeness
17+
- The APIs are optimized for conclusive sampling decisions
18+
19+
## Sample with `tracesSampleRate`
20+
21+
The SDK is automatically initialized with a `tracesSampleRate` of `0.0`.
22+
When starting a root span, the configured rate is compared against a random number between `0.0` and `1.0` to decide if this root span will be sampled or not.
23+
24+
## Sample with `tracesSampler`
25+
26+
If the SDK is configured with a `tracesSampler`, the `tracesSampleRate` no longer applies.
27+
28+
The `tracesSampler` callback MUST receive sufficient arguments from users to define their own sampling rules.
29+
This MAY include but is not limited to certain attributes from the root span, such as HTTP headers.
30+
The return value of the `tracesSampler` is a float between `0.0` and `1.0`.
31+
32+
If no `tracesSampler` is configured, a propagated sampling decision via the traceparent takes precedence over the `tracesSampleRate`. This behavior MAY be disabled by defining a `tracesSampler`.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Scrubbing data
3+
---
4+
5+
<Alert level="warning">
6+
🚧 This document is work in progress.
7+
</Alert>
8+
9+
<Alert level="info">
10+
This document uses key words such as "MUST", "SHOULD", and "MAY" as defined in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) to indicate requirement levels.
11+
</Alert>
12+
13+
## Scrubbing data with `beforeSendSpans`
14+
15+
This callback MUST NOT allow the removal of any spans from the span tree.
16+
It receives a deep copy of all spans in the span tree and their attributes.
17+
18+
```
19+
[
20+
{
21+
'name': 'GET /',
22+
'attributes': [
23+
'http.request.method': 'GET',
24+
'http.response.status_code': 200,
25+
]
26+
},
27+
]
28+
```
29+
30+
Users MAY mutate any exposed properties to perform sanitation on sensitive data or PII.
31+
The return value of `beforeSendSpans` MUST be merged with the original span tree prior to emission.

docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Sentry.init({
6363
// Add Tracing by setting tracesSampleRate and adding integration
6464
// Set tracesSampleRate to 1.0 to capture 100% of transactions
6565
// We recommend adjusting this value in production
66+
// Learn more at
67+
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
6668
tracesSampleRate: 1.0,
6769
});
6870

docs/platforms/javascript/guides/aws-lambda/install/cjs-layer.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ Sentry.init({
7575
// Add Tracing by setting tracesSampleRate and adding integration
7676
// Set tracesSampleRate to 1.0 to capture 100% of transactions
7777
// We recommend adjusting this value in production
78+
// Learn more at
79+
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
7880
tracesSampleRate: 1.0,
7981
});
8082

docs/platforms/javascript/guides/aws-lambda/install/cjs-npm.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Sentry.init({
7272
// Add Tracing by setting tracesSampleRate and adding integration
7373
// Set tracesSampleRate to 1.0 to capture 100% of transactions
7474
// We recommend adjusting this value in production
75+
// Learn more at
76+
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
7577
tracesSampleRate: 1.0,
7678
// Set sampling rate for profiling - this is relative to tracesSampleRate
7779
profilesSampleRate: 1.0,

docs/platforms/javascript/guides/aws-lambda/install/esm-npm.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ Sentry.init({
117117
// Add Tracing by setting tracesSampleRate and adding integration
118118
// Set tracesSampleRate to 1.0 to capture 100% of transactions
119119
// We recommend adjusting this value in production
120+
// Learn more at
121+
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
120122
tracesSampleRate: 1.0,
121123
// Set sampling rate for profiling - this is relative to tracesSampleRate
122124
profilesSampleRate: 1.0,

0 commit comments

Comments
 (0)