Skip to content

Commit 73e15ca

Browse files
feat(insights): Updates queues instrumentation for python to use transaction set status (#13248)
1 parent f1ff80f commit 73e15ca

File tree

1 file changed

+2
-2
lines changed
  • docs/platforms/python/tracing/instrumentation/custom-instrumentation

1 file changed

+2
-2
lines changed

docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ To start capturing performance metrics, use the `sentry_sdk.start_span()` functi
8383

8484
Your `queue.process` span must exist inside a transaction in order to be recognized as a consumer span. If you are using a <PlatformLink to="/integrations/#web-frameworks">supported web framework</PlatformLink>, the transaction is created by the integration. If you use plain Python, you can start a new one using `sentry_sdk.start_transaction()`.
8585

86-
Use `sentry_sdk.continue_trace()` to connect your consumer spans to their associated producer spans, and `span.set_status()` to mark the trace of your message as success or failed.
86+
Use `sentry_sdk.continue_trace()` to connect your consumer spans to their associated producer spans, and `transaction.set_status()` to mark the trace of your message as success or failed.
8787

8888

8989
```python
@@ -132,5 +132,5 @@ with sentry_sdk.start_transaction(transaction):
132132
process_message(message)
133133
except Exception:
134134
# In case of an error set the status to "internal_error"
135-
span.set_status("internal_error")
135+
transaction.set_status("internal_error")
136136
```

0 commit comments

Comments
 (0)