diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dc79767..f5008e64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.7.2 - 2024-11-19 + +1. Add `type` property to exception stacks. + ## 3.7.1 - 2024-10-24 1. Add `platform` property to each frame of exception stacks. diff --git a/posthog/exception_utils.py b/posthog/exception_utils.py index 75282d10..17b7630d 100644 --- a/posthog/exception_utils.py +++ b/posthog/exception_utils.py @@ -418,7 +418,7 @@ def current_stacktrace( frames.reverse() - return {"frames": frames} + return {"frames": frames, "type": "raw"} def get_errno(exc_value): @@ -504,7 +504,7 @@ def single_exception_from_error_tuple( ] if frames: - exception_value["stacktrace"] = {"frames": frames} + exception_value["stacktrace"] = {"frames": frames, "type": "raw"} return exception_value diff --git a/posthog/test/test_client.py b/posthog/test/test_client.py index a3a1bfad..feb5dd2e 100644 --- a/posthog/test/test_client.py +++ b/posthog/test/test_client.py @@ -231,6 +231,10 @@ def test_basic_capture_exception_with_no_exception_given(self): self.assertEqual(capture_call[2]["$exception_list"][0]["module"], None) self.assertEqual(capture_call[2]["$exception_list"][0]["type"], "Exception") self.assertEqual(capture_call[2]["$exception_list"][0]["value"], "test exception") + self.assertEqual( + capture_call[2]["$exception_list"][0]["stacktrace"]["type"], + "raw", + ) self.assertEqual( capture_call[2]["$exception_list"][0]["stacktrace"]["frames"][0]["filename"], "posthog/test/test_client.py", diff --git a/posthog/version.py b/posthog/version.py index 5b234a88..f0f5a9e2 100644 --- a/posthog/version.py +++ b/posthog/version.py @@ -1,4 +1,4 @@ -VERSION = "3.7.1" +VERSION = "3.7.2" if __name__ == "__main__": print(VERSION, end="") # noqa: T201