From 40f8d12cad932e739e0251a9254de47ee37c44cd Mon Sep 17 00:00:00 2001 From: mrkaye97 Date: Wed, 12 Feb 2025 13:24:42 -0500 Subject: [PATCH 1/2] fix: patch action payload issue caused by wrong type hint --- hatchet_sdk/clients/dispatcher/action_listener.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hatchet_sdk/clients/dispatcher/action_listener.py b/hatchet_sdk/clients/dispatcher/action_listener.py index f5d20e8e..cf231a76 100644 --- a/hatchet_sdk/clients/dispatcher/action_listener.py +++ b/hatchet_sdk/clients/dispatcher/action_listener.py @@ -91,6 +91,11 @@ def __post_init__(self): @property def otel_attributes(self) -> dict[str, str | int]: + try: + payload_str = json.dumps(self.action_payload, default=str) + except Exception: + payload_str = str(self.action_payload) + attrs: dict[str, str | int | None] = { "hatchet.tenant_id": self.tenant_id, "hatchet.worker_id": self.worker_id, @@ -101,7 +106,7 @@ def otel_attributes(self) -> dict[str, str | int]: "hatchet.parent_workflow_run_id": self.parent_workflow_run_id, "hatchet.child_workflow_index": self.child_workflow_index, "hatchet.child_workflow_key": self.child_workflow_key, - "hatchet.action_payload": self.action_payload, + "hatchet.action_payload": payload_str, "hatchet.workflow_name": self.job_name, "hatchet.action_name": self.action_id, "hatchet.get_group_key_run_id": self.get_group_key_run_id, From f755fd0454fdba463b134bc5837a1f4954021dda Mon Sep 17 00:00:00 2001 From: mrkaye97 Date: Wed, 12 Feb 2025 13:25:06 -0500 Subject: [PATCH 2/2] chore: ver --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 23df3a4e..29cc6578 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "hatchet-sdk" -version = "0.46.0" +version = "0.46.1" description = "" authors = ["Alexander Belanger "] readme = "README.md"