From b11ece52df87037493156e2f10c8d915b90989e5 Mon Sep 17 00:00:00 2001 From: Edward Gou Date: Fri, 4 Apr 2025 15:19:06 -0400 Subject: [PATCH 1/2] Updates queues instrumentation for python to use transaction set status --- .../instrumentation/custom-instrumentation/queues-module.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx index 47c5572b5c440f..62db57cba2dc6f 100644 --- a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx +++ b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx @@ -132,5 +132,5 @@ with sentry_sdk.start_transaction(transaction): process_message(message) except Exception: # In case of an error set the status to "internal_error" - span.set_status("internal_error") + transaction.set_status("internal_error") ``` From bac9b2225264d95302bb05161f2f312c595735c1 Mon Sep 17 00:00:00 2001 From: Edward Gou Date: Fri, 4 Apr 2025 15:21:08 -0400 Subject: [PATCH 2/2] Updates queues instrumentation for python to use transaction set status --- .../instrumentation/custom-instrumentation/queues-module.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx index 62db57cba2dc6f..1d67add747b7e4 100644 --- a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx +++ b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.mdx @@ -83,7 +83,7 @@ To start capturing performance metrics, use the `sentry_sdk.start_span()` functi Your `queue.process` span must exist inside a transaction in order to be recognized as a consumer span. If you are using a supported web framework, the transaction is created by the integration. If you use plain Python, you can start a new one using `sentry_sdk.start_transaction()`. -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. +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. ```python