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
feat(tracing): Add convenience function update_current_span. (#4673)
Manually setting data on spans for our insights modules can be made
easier. This PR introduces a convenience function.
Right now users need to do some like this:
```python
import sentry_sdk
span = sentry_sdk.get_current_span()
if span is not None:
span.description = f"Some {dynamic} name"
span.set_attribute("key1", "value1")
span.set_attribute("key2", "value2")
```
With this new convenience function a user can do:
```python
import sentry_sdk
sentry_sdk.update_current_span(
name=f"Some {dynamic} name",
attributes={
"key1": "value1",
"key2": "value2",
},
)
0 commit comments