diff --git a/src/lumigo_tracer/wrappers/http/http_parser.py b/src/lumigo_tracer/wrappers/http/http_parser.py index a367fe64..77ea3d61 100644 --- a/src/lumigo_tracer/wrappers/http/http_parser.py +++ b/src/lumigo_tracer/wrappers/http/http_parser.py @@ -217,6 +217,10 @@ def _extract_message_id(response_body: bytes) -> Optional[str]: safe_key_from_json(response_body, "Records", []), [0, "SequenceNumber"] # type: ignore ) + @staticmethod + def get_omit_skip_path() -> Optional[List[str]]: + return ["PartitionKey"] + class SqsParser(ServerlessAWSParser): def parse_request(self, parse_params: HttpRequest) -> dict: diff --git a/src/test/component/test_component.py b/src/test/component/test_component.py index 119dc943..11495a20 100644 --- a/src/test/component/test_component.py +++ b/src/test/component/test_component.py @@ -144,6 +144,8 @@ def lambda_test_function(): assert events[0]["info"]["httpInfo"]["host"] == f"kinesis.{region}.amazonaws.com" assert events[0]["info"]["resourceName"] == kinesis_resource assert events[0]["info"]["messageId"] + # No scrubbing for PartitionKey + assert json.loads(events[0]["info"]["httpInfo"]["request"]["body"])["PartitionKey"] == "1" # Batch messages. assert events[1]["info"]["httpInfo"]["host"] == f"kinesis.{region}.amazonaws.com" assert events[1]["info"]["resourceName"] == kinesis_resource