|
4 | 4 |
|
5 | 5 | ### Various fixes & improvements
|
6 | 6 |
|
7 |
| -- Added new functions_to_trace option for celtral way of performance instrumentation (#1960) by @antonpirker |
8 |
| -- Update OSS licensing (#1973) by @antonpirker |
| 7 | +- **New:** Implement `EventScrubber` (#1943) by @sl0thentr0py |
| 8 | + |
| 9 | + To learn more see our [Scrubbing Sensitive Data](https://docs.sentry.io/platforms/python/data-management/sensitive-data/#event-scrubber) documentation. |
| 10 | + |
| 11 | + Add a new `EventScrubber` class that scrubs certain potentially sensitive interfaces with a `DEFAULT_DENYLIST`. The default scrubber is automatically run if `send_default_pii = False`: |
| 12 | + |
| 13 | + ```python |
| 14 | + import sentry_sdk |
| 15 | + from sentry_sdk.scrubber import EventScrubber |
| 16 | + sentry_sdk.init( |
| 17 | + # ... |
| 18 | + send_default_pii=False, |
| 19 | + event_scrubber=EventScrubber(), # this is set by default |
| 20 | + ) |
| 21 | + ``` |
| 22 | + |
| 23 | + You can also pass in a custom `denylist` to the `EventScrubber` class and filter additional fields that you want. |
| 24 | + |
| 25 | + ```python |
| 26 | + from sentry_sdk.scrubber import EventScrubber, DEFAULT_DENYLIST |
| 27 | + # custom denylist |
| 28 | + denylist = DEFAULT_DENYLIST + ["my_sensitive_var"] |
| 29 | + sentry_sdk.init( |
| 30 | + # ... |
| 31 | + send_default_pii=False, |
| 32 | + event_scrubber=EventScrubber(denylist=denylist), |
| 33 | + ) |
| 34 | + ``` |
| 35 | + |
| 36 | +- **New:** Added new `functions_to_trace` option for central way of performance instrumentation (#1960) by @antonpirker |
| 37 | + |
| 38 | + To learn more see our [Tracing Options](https://docs.sentry.io/platforms/python/configuration/options/#functions-to-trace) documentation. |
| 39 | + |
| 40 | + An optional list of functions that should be set up for performance monitoring. For each function in the list, a span will be created when the function is executed. |
| 41 | + |
| 42 | + ```python |
| 43 | + functions_to_trace = [ |
| 44 | + {"qualified_name": "tests.test_basics._hello_world_counter"}, |
| 45 | + {"qualified_name": "time.sleep"}, |
| 46 | + {"qualified_name": "collections.Counter.most_common"}, |
| 47 | + ] |
| 48 | + |
| 49 | + sentry_sdk.init( |
| 50 | + # ... |
| 51 | + traces_sample_rate=1.0, |
| 52 | + functions_to_trace=functions_to_trace, |
| 53 | + ) |
| 54 | + ``` |
| 55 | + |
9 | 56 | - Updated denylist to include other widely used cookies/headers (#1972) by @antonpirker
|
10 |
| -- ref: Forward all `sentry-` baggage items (#1970) by @cleptric |
| 57 | +- Forward all `sentry-` baggage items (#1970) by @cleptric |
| 58 | +- Update OSS licensing (#1973) by @antonpirker |
| 59 | +- Profiling: Handle non frame types in profiler (#1965) by @Zylphrex |
| 60 | +- Tests: Bad arq dependency in tests (#1966) by @Zylphrex |
11 | 61 | - Better naming (#1962) by @antonpirker
|
12 |
| -- Implement EventScrubber (#1943) by @sl0thentr0py |
13 |
| -- fix(profiling): Handle non frame types in profiler (#1965) by @Zylphrex |
14 |
| -- fix(tests): Bad arq dependency in tests (#1966) by @Zylphrex |
15 | 62 |
|
16 | 63 | ## 1.17.0
|
17 | 64 |
|
|
0 commit comments