hatchet-sdk 0.45.3__tar.gz → 0.46.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of hatchet-sdk might be problematic. Click here for more details.

Files changed (237) hide show
  1. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/PKG-INFO +8 -8
  2. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/admin.py +59 -126
  3. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/dispatcher/action_listener.py +18 -21
  4. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/events.py +48 -85
  5. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/loader.py +14 -40
  6. hatchet_sdk-0.46.0/hatchet_sdk/opentelemetry/instrumentor.py +323 -0
  7. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/worker/runner/runner.py +102 -140
  8. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/pyproject.toml +19 -9
  9. hatchet_sdk-0.45.3/hatchet_sdk/utils/tracing.py +0 -70
  10. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/README.md +0 -0
  11. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/__init__.py +0 -0
  12. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/client.py +0 -0
  13. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/dispatcher/dispatcher.py +0 -0
  14. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/event_ts.py +0 -0
  15. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/__init__.py +0 -0
  16. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/__init__.py +0 -0
  17. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/api_token_api.py +0 -0
  18. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/default_api.py +0 -0
  19. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/event_api.py +0 -0
  20. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/github_api.py +0 -0
  21. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/healthcheck_api.py +0 -0
  22. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/log_api.py +0 -0
  23. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/metadata_api.py +0 -0
  24. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/rate_limits_api.py +0 -0
  25. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/slack_api.py +0 -0
  26. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/sns_api.py +0 -0
  27. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/step_run_api.py +0 -0
  28. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/tenant_api.py +0 -0
  29. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/user_api.py +0 -0
  30. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/worker_api.py +0 -0
  31. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/workflow_api.py +0 -0
  32. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/workflow_run_api.py +0 -0
  33. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api/workflow_runs_api.py +0 -0
  34. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api_client.py +0 -0
  35. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/api_response.py +0 -0
  36. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/configuration.py +0 -0
  37. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/exceptions.py +0 -0
  38. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/__init__.py +0 -0
  39. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/accept_invite_request.py +0 -0
  40. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/api_error.py +0 -0
  41. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/api_errors.py +0 -0
  42. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/api_meta.py +0 -0
  43. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/api_meta_auth.py +0 -0
  44. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/api_meta_integration.py +0 -0
  45. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/api_meta_posthog.py +0 -0
  46. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/api_resource_meta.py +0 -0
  47. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/api_token.py +0 -0
  48. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/bulk_create_event_request.py +0 -0
  49. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/bulk_create_event_response.py +0 -0
  50. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/cancel_event_request.py +0 -0
  51. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/cancel_step_run_request.py +0 -0
  52. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/concurrency_limit_strategy.py +0 -0
  53. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_api_token_request.py +0 -0
  54. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_api_token_response.py +0 -0
  55. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_cron_workflow_trigger_request.py +0 -0
  56. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_event_request.py +0 -0
  57. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_pull_request_from_step_run.py +0 -0
  58. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_sns_integration_request.py +0 -0
  59. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_tenant_alert_email_group_request.py +0 -0
  60. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_tenant_invite_request.py +0 -0
  61. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/create_tenant_request.py +0 -0
  62. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/cron_workflows.py +0 -0
  63. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/cron_workflows_list.py +0 -0
  64. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/cron_workflows_method.py +0 -0
  65. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +0 -0
  66. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/event.py +0 -0
  67. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/event_data.py +0 -0
  68. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/event_key_list.py +0 -0
  69. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/event_list.py +0 -0
  70. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/event_order_by_direction.py +0 -0
  71. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/event_order_by_field.py +0 -0
  72. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/event_update_cancel200_response.py +0 -0
  73. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/event_workflow_run_summary.py +0 -0
  74. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/events.py +0 -0
  75. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +0 -0
  76. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/github_app_installation.py +0 -0
  77. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/github_branch.py +0 -0
  78. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/github_repo.py +0 -0
  79. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/info_get_version200_response.py +0 -0
  80. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/job.py +0 -0
  81. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/job_run.py +0 -0
  82. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/job_run_status.py +0 -0
  83. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/link_github_repository_request.py +0 -0
  84. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/list_api_tokens_response.py +0 -0
  85. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/list_github_app_installations_response.py +0 -0
  86. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/list_pull_requests_response.py +0 -0
  87. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/list_slack_webhooks.py +0 -0
  88. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/list_sns_integrations.py +0 -0
  89. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/log_line.py +0 -0
  90. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/log_line_level.py +0 -0
  91. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/log_line_list.py +0 -0
  92. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/log_line_order_by_direction.py +0 -0
  93. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/log_line_order_by_field.py +0 -0
  94. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/pagination_response.py +0 -0
  95. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/pull_request.py +0 -0
  96. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/pull_request_state.py +0 -0
  97. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/queue_metrics.py +0 -0
  98. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/rate_limit.py +0 -0
  99. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/rate_limit_list.py +0 -0
  100. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/rate_limit_order_by_direction.py +0 -0
  101. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/rate_limit_order_by_field.py +0 -0
  102. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/recent_step_runs.py +0 -0
  103. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/reject_invite_request.py +0 -0
  104. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/replay_event_request.py +0 -0
  105. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/replay_workflow_runs_request.py +0 -0
  106. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +0 -0
  107. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/rerun_step_run_request.py +0 -0
  108. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/schedule_workflow_run_request.py +0 -0
  109. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/scheduled_run_status.py +0 -0
  110. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/scheduled_workflows.py +0 -0
  111. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/scheduled_workflows_list.py +0 -0
  112. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/scheduled_workflows_method.py +0 -0
  113. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +0 -0
  114. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/semaphore_slots.py +0 -0
  115. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/slack_webhook.py +0 -0
  116. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/sns_integration.py +0 -0
  117. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step.py +0 -0
  118. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run.py +0 -0
  119. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run_archive.py +0 -0
  120. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run_archive_list.py +0 -0
  121. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run_diff.py +0 -0
  122. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run_event.py +0 -0
  123. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run_event_list.py +0 -0
  124. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run_event_reason.py +0 -0
  125. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run_event_severity.py +0 -0
  126. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/step_run_status.py +0 -0
  127. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant.py +0 -0
  128. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_alert_email_group.py +0 -0
  129. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +0 -0
  130. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_alerting_settings.py +0 -0
  131. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_invite.py +0 -0
  132. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_invite_list.py +0 -0
  133. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_list.py +0 -0
  134. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_member.py +0 -0
  135. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_member_list.py +0 -0
  136. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_member_role.py +0 -0
  137. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +0 -0
  138. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_resource.py +0 -0
  139. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_resource_limit.py +0 -0
  140. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_resource_policy.py +0 -0
  141. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +0 -0
  142. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/trigger_workflow_run_request.py +0 -0
  143. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/update_tenant_alert_email_group_request.py +0 -0
  144. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/update_tenant_invite_request.py +0 -0
  145. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/update_tenant_request.py +0 -0
  146. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/update_worker_request.py +0 -0
  147. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/user.py +0 -0
  148. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/user_change_password_request.py +0 -0
  149. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/user_login_request.py +0 -0
  150. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/user_register_request.py +0 -0
  151. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +0 -0
  152. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/user_tenant_public.py +0 -0
  153. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/webhook_worker.py +0 -0
  154. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/webhook_worker_create_request.py +0 -0
  155. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/webhook_worker_create_response.py +0 -0
  156. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/webhook_worker_created.py +0 -0
  157. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +0 -0
  158. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/webhook_worker_request.py +0 -0
  159. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +0 -0
  160. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/webhook_worker_request_method.py +0 -0
  161. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/worker.py +0 -0
  162. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/worker_label.py +0 -0
  163. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/worker_list.py +0 -0
  164. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/worker_runtime_info.py +0 -0
  165. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +0 -0
  166. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/worker_type.py +0 -0
  167. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow.py +0 -0
  168. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_concurrency.py +0 -0
  169. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_deployment_config.py +0 -0
  170. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_kind.py +0 -0
  171. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_list.py +0 -0
  172. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_metrics.py +0 -0
  173. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_run.py +0 -0
  174. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_run_cancel200_response.py +0 -0
  175. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_run_list.py +0 -0
  176. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_run_order_by_direction.py +0 -0
  177. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_run_order_by_field.py +0 -0
  178. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_run_shape.py +0 -0
  179. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_run_status.py +0 -0
  180. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_run_triggered_by.py +0 -0
  181. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_runs_cancel_request.py +0 -0
  182. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +0 -0
  183. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_runs_metrics_counts.py +0 -0
  184. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_tag.py +0 -0
  185. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_trigger_cron_ref.py +0 -0
  186. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_trigger_event_ref.py +0 -0
  187. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_triggers.py +0 -0
  188. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_update_request.py +0 -0
  189. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_version.py +0 -0
  190. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_version_concurrency.py +0 -0
  191. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_version_definition.py +0 -0
  192. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_version_meta.py +0 -0
  193. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/models/workflow_workers_count.py +0 -0
  194. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/rest.py +0 -0
  195. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest/tenacity_utils.py +0 -0
  196. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/rest_client.py +0 -0
  197. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/run_event_listener.py +0 -0
  198. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/clients/workflow_listener.py +0 -0
  199. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/connection.py +0 -0
  200. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/context/__init__.py +0 -0
  201. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/context/context.py +0 -0
  202. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/context/worker_context.py +0 -0
  203. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/dispatcher_pb2.py +0 -0
  204. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/dispatcher_pb2.pyi +0 -0
  205. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/dispatcher_pb2_grpc.py +0 -0
  206. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/events_pb2.py +0 -0
  207. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/events_pb2.pyi +0 -0
  208. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/events_pb2_grpc.py +0 -0
  209. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/workflows_pb2.py +0 -0
  210. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/workflows_pb2.pyi +0 -0
  211. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/contracts/workflows_pb2_grpc.py +0 -0
  212. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/features/cron.py +0 -0
  213. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/features/scheduled.py +0 -0
  214. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/hatchet.py +0 -0
  215. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/labels.py +0 -0
  216. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/logger.py +0 -0
  217. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/metadata.py +0 -0
  218. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/py.typed +0 -0
  219. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/rate_limit.py +0 -0
  220. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/semver.py +0 -0
  221. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/token.py +0 -0
  222. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/utils/aio_utils.py +0 -0
  223. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/utils/backoff.py +0 -0
  224. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/utils/serialization.py +0 -0
  225. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/utils/types.py +0 -0
  226. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/utils/typing.py +0 -0
  227. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/v2/callable.py +0 -0
  228. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/v2/concurrency.py +0 -0
  229. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/v2/hatchet.py +0 -0
  230. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/worker/__init__.py +0 -0
  231. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/worker/action_listener_process.py +0 -0
  232. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/worker/runner/run_loop_manager.py +0 -0
  233. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/worker/runner/utils/capture_logs.py +0 -0
  234. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/worker/runner/utils/error_with_traceback.py +0 -0
  235. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/worker/worker.py +0 -0
  236. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/workflow.py +0 -0
  237. {hatchet_sdk-0.45.3 → hatchet_sdk-0.46.0}/hatchet_sdk/workflow_run.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hatchet-sdk
3
- Version: 0.45.3
3
+ Version: 0.46.0
4
4
  Summary:
5
5
  Author: Alexander Belanger
6
6
  Author-email: alexander@hatchet.run
@@ -9,6 +9,7 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.10
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
+ Provides-Extra: otel
12
13
  Requires-Dist: aiohttp (>=3.10.5,<4.0.0)
13
14
  Requires-Dist: aiohttp-retry (>=2.8.3,<3.0.0)
14
15
  Requires-Dist: aiostream (>=0.5.2,<0.6.0)
@@ -17,14 +18,13 @@ Requires-Dist: grpcio (>=1.64.1,!=1.68.*) ; python_version < "3.13"
17
18
  Requires-Dist: grpcio (>=1.69.0) ; python_version >= "3.13"
18
19
  Requires-Dist: grpcio-tools (>=1.64.1,!=1.68.*) ; python_version < "3.13"
19
20
  Requires-Dist: grpcio-tools (>=1.69.0) ; python_version >= "3.13"
20
- Requires-Dist: loguru (>=0.7.2,<0.8.0)
21
21
  Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
22
- Requires-Dist: opentelemetry-api (>=1.28.0,<2.0.0)
23
- Requires-Dist: opentelemetry-distro (>=0.49b0)
24
- Requires-Dist: opentelemetry-exporter-otlp (>=1.28.0,<2.0.0)
25
- Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.28.0,<2.0.0)
26
- Requires-Dist: opentelemetry-instrumentation (>=0.49b0)
27
- Requires-Dist: opentelemetry-sdk (>=1.28.0,<2.0.0)
22
+ Requires-Dist: opentelemetry-api (>=1.28.0,<2.0.0) ; extra == "otel"
23
+ Requires-Dist: opentelemetry-distro (>=0.49b0) ; extra == "otel"
24
+ Requires-Dist: opentelemetry-exporter-otlp (>=1.28.0,<2.0.0) ; extra == "otel"
25
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.28.0,<2.0.0) ; extra == "otel"
26
+ Requires-Dist: opentelemetry-instrumentation (>=0.49b0) ; extra == "otel"
27
+ Requires-Dist: opentelemetry-sdk (>=1.28.0,<2.0.0) ; extra == "otel"
28
28
  Requires-Dist: prometheus-client (>=0.21.1,<0.22.0)
29
29
  Requires-Dist: protobuf (>=5.29.1,<6.0.0)
30
30
  Requires-Dist: pydantic (>=2.6.3,<3.0.0)
@@ -24,12 +24,6 @@ from hatchet_sdk.contracts.workflows_pb2 import (
24
24
  )
25
25
  from hatchet_sdk.contracts.workflows_pb2_grpc import WorkflowServiceStub
26
26
  from hatchet_sdk.utils.serialization import flatten
27
- from hatchet_sdk.utils.tracing import (
28
- create_carrier,
29
- create_tracer,
30
- inject_carrier_into_metadata,
31
- parse_carrier_from_metadata,
32
- )
33
27
  from hatchet_sdk.workflow_run import RunRef, WorkflowRunRef
34
28
 
35
29
  from ..loader import ClientConfig
@@ -174,7 +168,6 @@ class AdminClientAioImpl(AdminClientBase):
174
168
  self.token = config.token
175
169
  self.listener_client = new_listener(config)
176
170
  self.namespace = config.namespace
177
- self.otel_tracer = create_tracer(config=config)
178
171
 
179
172
  async def run(
180
173
  self,
@@ -193,74 +186,46 @@ class AdminClientAioImpl(AdminClientBase):
193
186
  wrr.workflow_run_id, wrr.workflow_listener, wrr.workflow_run_event_listener
194
187
  )
195
188
 
189
+ ## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
196
190
  @tenacity_retry
197
191
  async def run_workflow(
198
192
  self, workflow_name: str, input: any, options: TriggerWorkflowOptions = None
199
193
  ) -> WorkflowRunRef:
200
- ctx = parse_carrier_from_metadata(
201
- (options or {}).get("additional_metadata", {})
202
- )
194
+ try:
195
+ if not self.pooled_workflow_listener:
196
+ self.pooled_workflow_listener = PooledWorkflowRunListener(self.config)
203
197
 
204
- with self.otel_tracer.start_as_current_span(
205
- f"hatchet.async_run_workflow.{workflow_name}", context=ctx
206
- ) as span:
207
- carrier = create_carrier()
198
+ namespace = self.namespace
208
199
 
209
- try:
210
- if not self.pooled_workflow_listener:
211
- self.pooled_workflow_listener = PooledWorkflowRunListener(
212
- self.config
213
- )
214
-
215
- namespace = self.namespace
216
-
217
- if (
218
- options is not None
219
- and "namespace" in options
220
- and options["namespace"] is not None
221
- ):
222
- namespace = options.pop("namespace")
223
-
224
- if namespace != "" and not workflow_name.startswith(self.namespace):
225
- workflow_name = f"{namespace}{workflow_name}"
226
-
227
- if options is not None and "additional_metadata" in options:
228
- options["additional_metadata"] = inject_carrier_into_metadata(
229
- options["additional_metadata"], carrier
230
- )
231
- span.set_attributes(
232
- flatten(
233
- options["additional_metadata"], parent_key="", separator="."
234
- )
235
- )
236
-
237
- request = self._prepare_workflow_request(workflow_name, input, options)
238
-
239
- span.add_event(
240
- "Triggering workflow", attributes={"workflow_name": workflow_name}
241
- )
200
+ if (
201
+ options is not None
202
+ and "namespace" in options
203
+ and options["namespace"] is not None
204
+ ):
205
+ namespace = options.pop("namespace")
242
206
 
243
- resp: TriggerWorkflowResponse = await self.aio_client.TriggerWorkflow(
244
- request,
245
- metadata=get_metadata(self.token),
246
- )
207
+ if namespace != "" and not workflow_name.startswith(self.namespace):
208
+ workflow_name = f"{namespace}{workflow_name}"
247
209
 
248
- span.add_event(
249
- "Received workflow response",
250
- attributes={"workflow_name": workflow_name},
251
- )
210
+ request = self._prepare_workflow_request(workflow_name, input, options)
252
211
 
253
- return WorkflowRunRef(
254
- workflow_run_id=resp.workflow_run_id,
255
- workflow_listener=self.pooled_workflow_listener,
256
- workflow_run_event_listener=self.listener_client,
257
- )
258
- except (grpc.RpcError, grpc.aio.AioRpcError) as e:
259
- if e.code() == grpc.StatusCode.ALREADY_EXISTS:
260
- raise DedupeViolationErr(e.details())
212
+ resp: TriggerWorkflowResponse = await self.aio_client.TriggerWorkflow(
213
+ request,
214
+ metadata=get_metadata(self.token),
215
+ )
261
216
 
262
- raise e
217
+ return WorkflowRunRef(
218
+ workflow_run_id=resp.workflow_run_id,
219
+ workflow_listener=self.pooled_workflow_listener,
220
+ workflow_run_event_listener=self.listener_client,
221
+ )
222
+ except (grpc.RpcError, grpc.aio.AioRpcError) as e:
223
+ if e.code() == grpc.StatusCode.ALREADY_EXISTS:
224
+ raise DedupeViolationErr(e.details())
225
+
226
+ raise e
263
227
 
228
+ ## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
264
229
  @tenacity_retry
265
230
  async def run_workflows(
266
231
  self,
@@ -389,7 +354,6 @@ class AdminClient(AdminClientBase):
389
354
  self.token = config.token
390
355
  self.listener_client = new_listener(config)
391
356
  self.namespace = config.namespace
392
- self.otel_tracer = create_tracer(config=config)
393
357
 
394
358
  @tenacity_retry
395
359
  def put_workflow(
@@ -459,78 +423,47 @@ class AdminClient(AdminClientBase):
459
423
 
460
424
  raise e
461
425
 
462
- ## TODO: `options` is treated as a dict (wrong type hint)
463
- ## TODO: `any` type hint should come from `typing`
426
+ ## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
464
427
  @tenacity_retry
465
428
  def run_workflow(
466
429
  self, workflow_name: str, input: any, options: TriggerWorkflowOptions = None
467
430
  ) -> WorkflowRunRef:
468
- ctx = parse_carrier_from_metadata(
469
- (options or {}).get("additional_metadata", {})
470
- )
431
+ try:
432
+ if not self.pooled_workflow_listener:
433
+ self.pooled_workflow_listener = PooledWorkflowRunListener(self.config)
471
434
 
472
- with self.otel_tracer.start_as_current_span(
473
- f"hatchet.run_workflow.{workflow_name}", context=ctx
474
- ) as span:
475
- carrier = create_carrier()
435
+ namespace = self.namespace
476
436
 
477
- try:
478
- if not self.pooled_workflow_listener:
479
- self.pooled_workflow_listener = PooledWorkflowRunListener(
480
- self.config
481
- )
482
-
483
- namespace = self.namespace
484
-
485
- ## TODO: Factor this out - it's repeated a lot of places
486
- if (
487
- options is not None
488
- and "namespace" in options
489
- and options["namespace"] is not None
490
- ):
491
- namespace = options.pop("namespace")
492
-
493
- if options is not None and "additional_metadata" in options:
494
- options["additional_metadata"] = inject_carrier_into_metadata(
495
- options["additional_metadata"], carrier
496
- )
497
-
498
- span.set_attributes(
499
- flatten(
500
- options["additional_metadata"], parent_key="", separator="."
501
- )
502
- )
503
-
504
- if namespace != "" and not workflow_name.startswith(self.namespace):
505
- workflow_name = f"{namespace}{workflow_name}"
506
-
507
- request = self._prepare_workflow_request(workflow_name, input, options)
508
-
509
- span.add_event(
510
- "Triggering workflow", attributes={"workflow_name": workflow_name}
511
- )
437
+ ## TODO: Factor this out - it's repeated a lot of places
438
+ if (
439
+ options is not None
440
+ and "namespace" in options
441
+ and options["namespace"] is not None
442
+ ):
443
+ namespace = options.pop("namespace")
512
444
 
513
- resp: TriggerWorkflowResponse = self.client.TriggerWorkflow(
514
- request,
515
- metadata=get_metadata(self.token),
516
- )
445
+ if namespace != "" and not workflow_name.startswith(self.namespace):
446
+ workflow_name = f"{namespace}{workflow_name}"
517
447
 
518
- span.add_event(
519
- "Received workflow response",
520
- attributes={"workflow_name": workflow_name},
521
- )
448
+ request = self._prepare_workflow_request(workflow_name, input, options)
522
449
 
523
- return WorkflowRunRef(
524
- workflow_run_id=resp.workflow_run_id,
525
- workflow_listener=self.pooled_workflow_listener,
526
- workflow_run_event_listener=self.listener_client,
527
- )
528
- except (grpc.RpcError, grpc.aio.AioRpcError) as e:
529
- if e.code() == grpc.StatusCode.ALREADY_EXISTS:
530
- raise DedupeViolationErr(e.details())
450
+ resp: TriggerWorkflowResponse = self.client.TriggerWorkflow(
451
+ request,
452
+ metadata=get_metadata(self.token),
453
+ )
454
+
455
+ return WorkflowRunRef(
456
+ workflow_run_id=resp.workflow_run_id,
457
+ workflow_listener=self.pooled_workflow_listener,
458
+ workflow_run_event_listener=self.listener_client,
459
+ )
460
+ except (grpc.RpcError, grpc.aio.AioRpcError) as e:
461
+ if e.code() == grpc.StatusCode.ALREADY_EXISTS:
462
+ raise DedupeViolationErr(e.details())
531
463
 
532
- raise e
464
+ raise e
533
465
 
466
+ ## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
534
467
  @tenacity_retry
535
468
  def run_workflows(
536
469
  self, workflows: List[WorkflowRunDict], options: TriggerWorkflowOptions = None
@@ -90,27 +90,24 @@ class Action:
90
90
  self.additional_metadata = {}
91
91
 
92
92
  @property
93
- def otel_attributes(self) -> dict[str, Any]:
94
- return flatten(
95
- xs={
96
- "worker_id": self.worker_id,
97
- "tenant_id": self.tenant_id,
98
- "workflow_run_id": self.workflow_run_id,
99
- "get_group_key_run_id": self.get_group_key_run_id,
100
- "job_id": self.job_id,
101
- "job_name": self.job_name,
102
- "job_run_id": self.job_run_id,
103
- "step_id": self.step_id,
104
- "step_run_id": self.step_run_id,
105
- "retry_count": self.retry_count,
106
- "child_workflow_index": self.child_workflow_index,
107
- "child_workflow_key": self.child_workflow_key,
108
- "parent_workflow_run_id": self.parent_workflow_run_id,
109
- "action_payload": self.action_payload,
110
- },
111
- parent_key="",
112
- separator=".",
113
- )
93
+ def otel_attributes(self) -> dict[str, str | int]:
94
+ attrs: dict[str, str | int | None] = {
95
+ "hatchet.tenant_id": self.tenant_id,
96
+ "hatchet.worker_id": self.worker_id,
97
+ "hatchet.workflow_run_id": self.workflow_run_id,
98
+ "hatchet.step_id": self.step_id,
99
+ "hatchet.step_run_id": self.step_run_id,
100
+ "hatchet.retry_count": self.retry_count,
101
+ "hatchet.parent_workflow_run_id": self.parent_workflow_run_id,
102
+ "hatchet.child_workflow_index": self.child_workflow_index,
103
+ "hatchet.child_workflow_key": self.child_workflow_key,
104
+ "hatchet.action_payload": self.action_payload,
105
+ "hatchet.workflow_name": self.job_name,
106
+ "hatchet.action_name": self.action_id,
107
+ "hatchet.get_group_key_run_id": self.get_group_key_run_id,
108
+ }
109
+
110
+ return {k: v for k, v in attrs.items() if v}
114
111
 
115
112
 
116
113
  START_STEP_RUN = 0
@@ -17,12 +17,6 @@ from hatchet_sdk.contracts.events_pb2 import (
17
17
  )
18
18
  from hatchet_sdk.contracts.events_pb2_grpc import EventsServiceStub
19
19
  from hatchet_sdk.utils.serialization import flatten
20
- from hatchet_sdk.utils.tracing import (
21
- create_carrier,
22
- create_tracer,
23
- inject_carrier_into_metadata,
24
- parse_carrier_from_metadata,
25
- )
26
20
 
27
21
  from ..loader import ClientConfig
28
22
  from ..metadata import get_metadata
@@ -63,7 +57,6 @@ class EventClient:
63
57
  self.client = client
64
58
  self.token = config.token
65
59
  self.namespace = config.namespace
66
- self.otel_tracer = create_tracer(config=config)
67
60
 
68
61
  async def async_push(
69
62
  self, event_key, payload, options: Optional[PushEventOptions] = None
@@ -79,54 +72,41 @@ class EventClient:
79
72
  ) -> List[Event]:
80
73
  return await asyncio.to_thread(self.bulk_push, events=events, options=options)
81
74
 
75
+ ## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
82
76
  @tenacity_retry
83
77
  def push(self, event_key, payload, options: PushEventOptions = None) -> Event:
84
- ctx = parse_carrier_from_metadata(
85
- (options or {}).get("additional_metadata", {})
86
- )
87
-
88
- with self.otel_tracer.start_as_current_span(
89
- "hatchet.push", context=ctx
90
- ) as span:
91
- carrier = create_carrier()
92
- namespace = self.namespace
93
-
94
- if (
95
- options is not None
96
- and "namespace" in options
97
- and options["namespace"] is not None
98
- ):
99
- namespace = options.pop("namespace")
100
-
101
- namespaced_event_key = namespace + event_key
102
-
103
- try:
104
- meta = inject_carrier_into_metadata(
105
- dict() if options is None else options["additional_metadata"],
106
- carrier,
107
- )
108
- meta_bytes = None if meta is None else json.dumps(meta).encode("utf-8")
109
- except Exception as e:
110
- raise ValueError(f"Error encoding meta: {e}")
78
+ namespace = self.namespace
111
79
 
112
- span.set_attributes(flatten(meta, parent_key="", separator="."))
80
+ if (
81
+ options is not None
82
+ and "namespace" in options
83
+ and options["namespace"] is not None
84
+ ):
85
+ namespace = options.pop("namespace")
113
86
 
114
- try:
115
- payload_bytes = json.dumps(payload).encode("utf-8")
116
- except json.UnicodeEncodeError as e:
117
- raise ValueError(f"Error encoding payload: {e}")
87
+ namespaced_event_key = namespace + event_key
118
88
 
119
- request = PushEventRequest(
120
- key=namespaced_event_key,
121
- payload=payload_bytes,
122
- eventTimestamp=proto_timestamp_now(),
123
- additionalMetadata=meta_bytes,
124
- )
89
+ try:
90
+ meta = dict() if options is None else options["additional_metadata"]
91
+ meta_bytes = None if meta is None else json.dumps(meta).encode("utf-8")
92
+ except Exception as e:
93
+ raise ValueError(f"Error encoding meta: {e}")
125
94
 
126
- span.add_event("Pushing event", attributes={"key": namespaced_event_key})
95
+ try:
96
+ payload_bytes = json.dumps(payload).encode("utf-8")
97
+ except json.UnicodeEncodeError as e:
98
+ raise ValueError(f"Error encoding payload: {e}")
99
+
100
+ request = PushEventRequest(
101
+ key=namespaced_event_key,
102
+ payload=payload_bytes,
103
+ eventTimestamp=proto_timestamp_now(),
104
+ additionalMetadata=meta_bytes,
105
+ )
127
106
 
128
- return self.client.Push(request, metadata=get_metadata(self.token))
107
+ return self.client.Push(request, metadata=get_metadata(self.token))
129
108
 
109
+ ## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
130
110
  @tenacity_retry
131
111
  def bulk_push(
132
112
  self,
@@ -134,10 +114,6 @@ class EventClient:
134
114
  options: BulkPushEventOptions = None,
135
115
  ) -> List[Event]:
136
116
  namespace = self.namespace
137
- bulk_push_correlation_id = uuid4()
138
- ctx = parse_carrier_from_metadata(
139
- (options or {}).get("additional_metadata", {})
140
- )
141
117
 
142
118
  if (
143
119
  options is not None
@@ -148,43 +124,30 @@ class EventClient:
148
124
 
149
125
  bulk_events = []
150
126
  for event in events:
151
- with self.otel_tracer.start_as_current_span(
152
- "hatchet.bulk_push", context=ctx
153
- ) as span:
154
- carrier = create_carrier()
155
- span.set_attribute(
156
- "bulk_push_correlation_id", str(bulk_push_correlation_id)
157
- )
158
-
159
- event_key = namespace + event["key"]
160
- payload = event["payload"]
161
-
162
- try:
163
- meta = inject_carrier_into_metadata(
164
- event.get("additional_metadata", {}), carrier
165
- )
166
- meta_bytes = json.dumps(meta).encode("utf-8") if meta else None
167
- except Exception as e:
168
- raise ValueError(f"Error encoding meta: {e}")
169
-
170
- span.set_attributes(flatten(meta, parent_key="", separator="."))
171
-
172
- try:
173
- payload_bytes = json.dumps(payload).encode("utf-8")
174
- except json.UnicodeEncodeError as e:
175
- raise ValueError(f"Error encoding payload: {e}")
176
-
177
- request = PushEventRequest(
178
- key=event_key,
179
- payload=payload_bytes,
180
- eventTimestamp=proto_timestamp_now(),
181
- additionalMetadata=meta_bytes,
182
- )
183
- bulk_events.append(request)
127
+ event_key = namespace + event["key"]
128
+ payload = event["payload"]
129
+
130
+ try:
131
+ meta = event.get("additional_metadata", {})
132
+ meta_bytes = json.dumps(meta).encode("utf-8") if meta else None
133
+ except Exception as e:
134
+ raise ValueError(f"Error encoding meta: {e}")
135
+
136
+ try:
137
+ payload_bytes = json.dumps(payload).encode("utf-8")
138
+ except json.UnicodeEncodeError as e:
139
+ raise ValueError(f"Error encoding payload: {e}")
140
+
141
+ request = PushEventRequest(
142
+ key=event_key,
143
+ payload=payload_bytes,
144
+ eventTimestamp=proto_timestamp_now(),
145
+ additionalMetadata=meta_bytes,
146
+ )
147
+ bulk_events.append(request)
184
148
 
185
149
  bulk_request = BulkPushEventRequest(events=bulk_events)
186
150
 
187
- span.add_event("Pushing bulk events")
188
151
  response = self.client.BulkPush(bulk_request, metadata=get_metadata(self.token))
189
152
 
190
153
  return response.events
@@ -1,7 +1,7 @@
1
- import json
2
1
  import os
3
2
  from logging import Logger, getLogger
4
3
  from typing import Dict, Optional
4
+ from warnings import warn
5
5
 
6
6
  import yaml
7
7
 
@@ -39,10 +39,6 @@ class ClientConfig:
39
39
  logger: Logger = None,
40
40
  grpc_max_recv_message_length: int = 4 * 1024 * 1024, # 4MB
41
41
  grpc_max_send_message_length: int = 4 * 1024 * 1024, # 4MB
42
- otel_exporter_oltp_endpoint: str | None = None,
43
- otel_service_name: str | None = None,
44
- otel_exporter_oltp_headers: dict[str, str] | None = None,
45
- otel_exporter_oltp_protocol: str | None = None,
46
42
  worker_healthcheck_port: int | None = None,
47
43
  worker_healthcheck_enabled: bool | None = None,
48
44
  worker_preset_labels: dict[str, str] = {},
@@ -56,10 +52,6 @@ class ClientConfig:
56
52
  self.logInterceptor = logger
57
53
  self.grpc_max_recv_message_length = grpc_max_recv_message_length
58
54
  self.grpc_max_send_message_length = grpc_max_send_message_length
59
- self.otel_exporter_oltp_endpoint = otel_exporter_oltp_endpoint
60
- self.otel_service_name = otel_service_name
61
- self.otel_exporter_oltp_headers = otel_exporter_oltp_headers
62
- self.otel_exporter_oltp_protocol = otel_exporter_oltp_protocol
63
55
  self.worker_healthcheck_port = worker_healthcheck_port
64
56
  self.worker_healthcheck_enabled = worker_healthcheck_enabled
65
57
  self.worker_preset_labels = worker_preset_labels
@@ -142,33 +134,6 @@ class ConfigLoader:
142
134
 
143
135
  tls_config = self._load_tls_config(config_data["tls"], host_port)
144
136
 
145
- otel_exporter_oltp_endpoint = get_config_value(
146
- "otel_exporter_oltp_endpoint", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_ENDPOINT"
147
- )
148
-
149
- otel_service_name = get_config_value(
150
- "otel_service_name", "HATCHET_CLIENT_OTEL_SERVICE_NAME"
151
- )
152
-
153
- _oltp_headers = get_config_value(
154
- "otel_exporter_oltp_headers", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_HEADERS"
155
- )
156
-
157
- if _oltp_headers:
158
- try:
159
- otel_header_key, api_key = _oltp_headers.split("=", maxsplit=1)
160
- otel_exporter_oltp_headers = {otel_header_key: api_key}
161
- except ValueError:
162
- raise ValueError(
163
- "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_HEADERS must be in the format `key=value`"
164
- )
165
- else:
166
- otel_exporter_oltp_headers = None
167
-
168
- otel_exporter_oltp_protocol = get_config_value(
169
- "otel_exporter_oltp_protocol", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_PROTOCOL"
170
- )
171
-
172
137
  worker_healthcheck_port = int(
173
138
  get_config_value(
174
139
  "worker_healthcheck_port", "HATCHET_CLIENT_WORKER_HEALTHCHECK_PORT"
@@ -196,6 +161,19 @@ class ConfigLoader:
196
161
  if autoscaling_target:
197
162
  worker_preset_labels["hatchet-autoscaling-target"] = autoscaling_target
198
163
 
164
+ legacy_otlp_headers = get_config_value(
165
+ "otel_exporter_otlp_endpoint", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_ENDPOINT"
166
+ )
167
+
168
+ legacy_otlp_headers = get_config_value(
169
+ "otel_exporter_otlp_headers", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_HEADERS"
170
+ )
171
+
172
+ if legacy_otlp_headers or legacy_otlp_headers:
173
+ warn(
174
+ "The `otel_exporter_otlp_*` fields are no longer supported as of SDK version `0.46.0`. Please see the documentation on OpenTelemetry at https://docs.hatchet.run/home/features/opentelemetry for more information on how to migrate to the new `HatchetInstrumentor`."
175
+ )
176
+
199
177
  return ClientConfig(
200
178
  tenant_id=tenant_id,
201
179
  tls_config=tls_config,
@@ -207,10 +185,6 @@ class ConfigLoader:
207
185
  logger=defaults.logInterceptor,
208
186
  grpc_max_recv_message_length=grpc_max_recv_message_length,
209
187
  grpc_max_send_message_length=grpc_max_send_message_length,
210
- otel_exporter_oltp_endpoint=otel_exporter_oltp_endpoint,
211
- otel_service_name=otel_service_name,
212
- otel_exporter_oltp_headers=otel_exporter_oltp_headers,
213
- otel_exporter_oltp_protocol=otel_exporter_oltp_protocol,
214
188
  worker_healthcheck_port=worker_healthcheck_port,
215
189
  worker_healthcheck_enabled=worker_healthcheck_enabled,
216
190
  worker_preset_labels=worker_preset_labels,