Improve documentation for configure_scope()
See original GitHub issueThe current documentation does not make it clear whether this code is permanent or if it is reverted as soon as the with
block is exited:
from sentry_sdk import configure_scope
with configure_scope() as scope:
scope.set_tag("my-tag", "my value")
scope.user = {'id': 42, 'email': 'john.doe@example.com'}
I assume it is permanent, because if it is not then there would be no difference from push_scope
, but it should be made explicit with an example (the opposite of the example given for push_scope
would make it clear).
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Scopes and Hubs for JavaScript | Sentry Documentation
The most useful operation when working with scopes is the configure-scope function. It can be used to reconfigure the current scope. You'll first...
Read more >Sentry.configureScope, do not execute callback if there is no ...
Using expressjs im creating scope using given code (similar to it). Sentry.configureScope((scope: Scope) => { // some code scope.setUser(req.
Read more >Unified API - Sentry Developer Documentation
This documentation explains what the unified API is and why it exists. ... Hub::pop_scope() (optional): Only exists in languages without better resource ...
Read more >Manual | Sentry .NET
You can create new scopes, which will clone the previous but will be totally isolated from it. The scope can be configured through:...
Read more >Can we send additional data to Sentry? [#3254091] | Drupal.org
We may need to improve the documentation a bit here :) Log in or register to post comments. mfb's picture. Comment #3.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aviv-ebates nothing. it will be gone or at least superseded soon. configure_scope is a concept that didn’t translate well to python from other languages
This is the one that contains the counter-example:
https://docs.sentry.io/enriching-error-data/scopes/?platform=python
Inverting that example would give something like this: