You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose the scope getters to top level API and use them everywhere (#3357)
* Expose the scope getters to top level API and use them everywhere
* Going forward, we might have 2 different scope implementations so we
can't have the `Scope` class being called everywhere directly since this
will be abstracted away.
* Update CHANGELOG.md
Co-authored-by: Ivana Kellyer <[email protected]>
* remove Scope._capture_internal_exception
* review fixes
* remove staticmethod
* Fix sphinx circular import bs
---------
Co-authored-by: Ivana Kellyer <[email protected]>
- PyMongo: Send query description as valid JSON (#3291) by @0Calories
74
74
- Remove Python 2 compatibility code (#3284) by @szokeasaurusrex
@@ -183,7 +183,7 @@ This change fixes a regression in our cron monitoring feature, which caused cron
183
183
```python
184
184
from sentry_sdk.integrations.starlette import StarletteIntegration
185
185
from sentry_sdk.integrations.fastapi import FastApiIntegration
186
-
186
+
187
187
sentry_sdk.init(
188
188
# ...
189
189
integrations=[
@@ -312,9 +312,9 @@ This change fixes a regression in our cron monitoring feature, which caused cron
312
312
integrations=[AnthropicIntegration()],
313
313
)
314
314
315
-
client = Anthropic()
315
+
client = Anthropic()
316
316
```
317
-
Check out [the Anthropic docs](https://docs.sentry.io/platforms/python/integrations/anthropic/) for details.
317
+
Check out [the Anthropic docs](https://docs.sentry.io/platforms/python/integrations/anthropic/) for details.
318
318
319
319
- **New integration:** [Huggingface Hub](https://docs.sentry.io/platforms/python/integrations/huggingface/) (#3033) by @colin-sentry
320
320
@@ -369,13 +369,13 @@ This change fixes a regression in our cron monitoring feature, which caused cron
369
369
370
370
## 2.0.0
371
371
372
-
This is the first major update in a *long* time!
372
+
This is the first major update in a *long* time!
373
373
374
374
We dropped support for some ancient languages and frameworks (Yes, Python 2.7 is no longer supported). Additionally we refactored a big part of the foundation of the SDK (how data inside the SDK is handled).
375
375
376
376
We hope you like it!
377
377
378
-
For a shorter version of what you need to do, to upgrade to Sentry SDK 2.0 see: https://docs.sentry.io/platforms/python/migration/1.x-to-2.x
378
+
For a shorter version of what you need to do, to upgrade to Sentry SDK 2.0 see: https://docs.sentry.io/platforms/python/migration/1.x-to-2.x
379
379
380
380
### New Features
381
381
@@ -415,7 +415,7 @@ For a shorter version of what you need to do, to upgrade to Sentry SDK 2.0 see:
- The classes listed in the table below are now abstract base classes. Therefore, they can no longer be instantiated. Subclasses can only be instantiated if they implement all of the abstract methods.
@@ -492,7 +492,7 @@ For a shorter version of what you need to do, to upgrade to Sentry SDK 2.0 see:
492
492
# do something with the forked scope
493
493
```
494
494
495
-
- `configure_scope` is deprecated. Use the new isolation scope directly via `Scope.get_isolation_scope()` instead.
495
+
- `configure_scope` is deprecated. Use the new isolation scope directly via `get_isolation_scope()` instead.
496
496
497
497
Before:
498
498
@@ -504,9 +504,9 @@ For a shorter version of what you need to do, to upgrade to Sentry SDK 2.0 see:
504
504
After:
505
505
506
506
```python
507
-
from sentry_sdk.scope import Scope
507
+
from sentry_sdk import get_isolation_scope
508
508
509
-
scope = Scope.get_isolation_scope()
509
+
scope = get_isolation_scope()
510
510
# do something with `scope`
511
511
```
512
512
@@ -563,7 +563,7 @@ This is the final 1.x release for the forseeable future. Development will contin
0 commit comments