Skip to content

Commit c8ae069

Browse files
committed
Cleanup
1 parent cfa5518 commit c8ae069

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sentry_sdk/integrations/aws_lambda.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ def sentry_handler(aws_event, aws_context, *args, **kwargs):
120120
configured_time = aws_context.get_remaining_time_in_millis()
121121

122122
with sentry_sdk.isolation_scope() as scope:
123+
scope.set_transaction_name(
124+
aws_context.function_name, source=TRANSACTION_SOURCE_COMPONENT
125+
)
123126
timeout_thread = None
124127
with capture_internal_exceptions():
125128
scope.clear_breadcrumbs()
@@ -160,7 +163,7 @@ def sentry_handler(aws_event, aws_context, *args, **kwargs):
160163
headers = {}
161164

162165
with sentry_sdk.continue_trace(headers):
163-
with sentry_sdk.start_transaction(
166+
with sentry_sdk.start_span(
164167
op=OP.FUNCTION_AWS,
165168
name=aws_context.function_name,
166169
source=TRANSACTION_SOURCE_COMPONENT,

0 commit comments

Comments
 (0)