@@ -330,10 +330,6 @@ def test_timeout_error_scope_modified(lambda_client, test_environment):
330330@pytest .mark .parametrize (
331331 "aws_event, has_request_data, batch_size" ,
332332 [
333- # Scalar events (int/float/string/bool) are one equivalence class:
334- # not a list, not a dict, so request_data falls back to {}.
335- # (An empty list hits the identical path: len < 1 -> else arm ->
336- # non-dict reset.)
337333 (b"1231" , False , 1 ),
338334 (
339335 b"""
@@ -459,7 +455,6 @@ def test_non_dict_event(
459455
460456
461457def test_user_info_with_data_collection (lambda_client , test_environment ):
462- # user_info collection on: the user identity is attached.
463458 lambda_client .invoke (
464459 FunctionName = "BasicOkDataCollectionUserInfoOn" ,
465460 Payload = USER_INFO_PAYLOAD ,
@@ -473,7 +468,6 @@ def test_user_info_with_data_collection(lambda_client, test_environment):
473468 "ip_address" : "213.47.147.207" ,
474469 }
475470
476- # user_info collection off: no user identity is attached.
477471 test_environment ["before_test" ]()
478472 lambda_client .invoke (
479473 FunctionName = "BasicOkDataCollectionUserInfoOff" ,
@@ -514,7 +508,6 @@ def _request_data_payload(extra_headers=None):
514508
515509
516510def test_request_data_with_data_collection (lambda_client , test_environment ):
517- # Allowlist behaviour: only allowlisted, non-sensitive headers pass through.
518511 lambda_client .invoke (
519512 FunctionName = "BasicOkDataCollectionAllowlist" ,
520513 Payload = _request_data_payload ({"X-Allow-Me" : "yes" }),
@@ -542,8 +535,6 @@ def test_request_data_with_data_collection(lambda_client, test_environment):
542535 "url" : "https://iwsz2c7uwi.execute-api.us-east-1.amazonaws.com/asd" ,
543536 }
544537
545- # Denylist behaviour: headers denied by custom terms or the built-in
546- # sensitive denylist are substituted.
547538 test_environment ["before_test" ]()
548539 lambda_client .invoke (
549540 FunctionName = "BasicOkDataCollectionDenylist" ,
@@ -555,7 +546,6 @@ def test_request_data_with_data_collection(lambda_client, test_environment):
555546
556547 assert transaction_event ["request" ] == {
557548 "headers" : {
558- # Not denied by any term -> pass through.
559549 "Host" : "iwsz2c7uwi.execute-api.us-east-1.amazonaws.com" ,
560550 "X-Custom" : "keep-me" ,
561551 # Denied by custom terms.
@@ -571,7 +561,6 @@ def test_request_data_with_data_collection(lambda_client, test_environment):
571561 "url" : "https://iwsz2c7uwi.execute-api.us-east-1.amazonaws.com/asd" ,
572562 }
573563
574- # Collection off: no headers are collected.
575564 test_environment ["before_test" ]()
576565 lambda_client .invoke (
577566 FunctionName = "BasicOkDataCollectionOff" ,
@@ -651,8 +640,6 @@ def test_request_data_with_data_collection(lambda_client, test_environment):
651640
652641
653642def test_url_query_params_with_data_collection (lambda_client , test_environment ):
654- # Denylist behaviour: params denied by custom terms or the built-in
655- # sensitive denylist are substituted.
656643 lambda_client .invoke (
657644 FunctionName = "BasicOkDataCollectionUrlQueryDenylist" ,
658645 Payload = URL_QUERY_PAYLOAD ,
@@ -690,7 +677,6 @@ def test_url_query_params_with_data_collection(lambda_client, test_environment):
690677 "token" : "[Filtered]" ,
691678 }
692679
693- # Collection off: no query string is collected.
694680 test_environment ["before_test" ]()
695681 lambda_client .invoke (
696682 FunctionName = "BasicOkDataCollectionUrlQueryOff" ,
@@ -700,7 +686,6 @@ def test_url_query_params_with_data_collection(lambda_client, test_environment):
700686
701687 (transaction_event ,) = envelopes
702688
703- # With url_query_params collection turned off, no query string is collected.
704689 assert "query_string" not in transaction_event ["request" ]
705690
706691
@@ -800,8 +785,9 @@ def _get_span_attr(attrs, key):
800785
801786
802787def _assert_segment_span_attrs (attrs , function_name ):
803- """Assert the full attribute set of an aws_lambda segment span."""
788+
804789 arn = "arn:aws:lambda:us-east-1:012345678912:function:%s" % function_name
790+
805791 assert _get_span_attr (attrs , "sentry.op" ) == "function.aws"
806792 assert _get_span_attr (attrs , "sentry.origin" ) == "auto.function.aws_lambda"
807793 assert _get_span_attr (attrs , "sentry.segment.name.source" ) == "component"
@@ -944,9 +930,6 @@ def test_span_streaming_request_attributes(lambda_client, test_environment):
944930 ]
945931 assert _get_span_attr (attrs , "aws.log.stream.names" ) == ["$LATEST" ]
946932
947- # url.query attribute with data_collection filtering: "page" passes
948- # through; "tracking" is denied by a custom term and "token" by the
949- # built-in sensitive denylist.
950933 test_environment ["before_test" ]()
951934 payload = {
952935 "httpMethod" : "GET" ,
0 commit comments