sentry-sdk 2.31.0__tar.gz → 2.32.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 sentry-sdk might be problematic. Click here for more details.

Files changed (201) hide show
  1. {sentry_sdk-2.31.0/sentry_sdk.egg-info → sentry_sdk-2.32.0}/PKG-INFO +1 -1
  2. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/__init__.py +2 -0
  3. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/api.py +16 -0
  4. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/consts.py +1 -1
  5. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/asgi.py +19 -3
  6. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/langchain.py +10 -5
  7. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/litestar.py +9 -0
  8. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/spans/execute_tool.py +6 -1
  9. sentry_sdk-2.32.0/sentry_sdk/integrations/ray.py +149 -0
  10. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0/sentry_sdk.egg-info}/PKG-INFO +1 -1
  11. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/setup.py +1 -1
  12. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_sessions.py +49 -0
  13. sentry_sdk-2.31.0/sentry_sdk/integrations/ray.py +0 -141
  14. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/LICENSE +0 -0
  15. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/MANIFEST.in +0 -0
  16. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/README.md +0 -0
  17. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/pyproject.toml +0 -0
  18. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/_compat.py +0 -0
  19. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/_init_implementation.py +0 -0
  20. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/_log_batcher.py +0 -0
  21. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/_lru_cache.py +0 -0
  22. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/_queue.py +0 -0
  23. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/_types.py +0 -0
  24. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/_werkzeug.py +0 -0
  25. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/ai/__init__.py +0 -0
  26. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/ai/monitoring.py +0 -0
  27. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/ai/utils.py +0 -0
  28. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/attachments.py +0 -0
  29. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/client.py +0 -0
  30. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/crons/__init__.py +0 -0
  31. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/crons/api.py +0 -0
  32. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/crons/consts.py +0 -0
  33. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/crons/decorator.py +0 -0
  34. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/debug.py +0 -0
  35. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/envelope.py +0 -0
  36. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/feature_flags.py +0 -0
  37. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/hub.py +0 -0
  38. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/__init__.py +0 -0
  39. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/_asgi_common.py +0 -0
  40. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/_wsgi_common.py +0 -0
  41. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/aiohttp.py +0 -0
  42. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/anthropic.py +0 -0
  43. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/argv.py +0 -0
  44. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/ariadne.py +0 -0
  45. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/arq.py +0 -0
  46. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/asyncio.py +0 -0
  47. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/asyncpg.py +0 -0
  48. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/atexit.py +0 -0
  49. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/aws_lambda.py +0 -0
  50. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/beam.py +0 -0
  51. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/boto3.py +0 -0
  52. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/bottle.py +0 -0
  53. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/celery/__init__.py +0 -0
  54. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/celery/beat.py +0 -0
  55. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/celery/utils.py +0 -0
  56. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/chalice.py +0 -0
  57. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/clickhouse_driver.py +0 -0
  58. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/cloud_resource_context.py +0 -0
  59. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/cohere.py +0 -0
  60. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/dedupe.py +0 -0
  61. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/django/__init__.py +0 -0
  62. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/django/asgi.py +0 -0
  63. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/django/caching.py +0 -0
  64. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/django/middleware.py +0 -0
  65. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/django/signals_handlers.py +0 -0
  66. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/django/templates.py +0 -0
  67. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/django/transactions.py +0 -0
  68. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/django/views.py +0 -0
  69. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/dramatiq.py +0 -0
  70. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/excepthook.py +0 -0
  71. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/executing.py +0 -0
  72. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/falcon.py +0 -0
  73. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/fastapi.py +0 -0
  74. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/flask.py +0 -0
  75. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/gcp.py +0 -0
  76. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/gnu_backtrace.py +0 -0
  77. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/gql.py +0 -0
  78. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/graphene.py +0 -0
  79. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/grpc/__init__.py +0 -0
  80. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/grpc/aio/__init__.py +0 -0
  81. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/grpc/aio/client.py +0 -0
  82. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/grpc/aio/server.py +0 -0
  83. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/grpc/client.py +0 -0
  84. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/grpc/consts.py +0 -0
  85. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/grpc/server.py +0 -0
  86. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/httpx.py +0 -0
  87. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/huey.py +0 -0
  88. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/huggingface_hub.py +0 -0
  89. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/launchdarkly.py +0 -0
  90. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/logging.py +0 -0
  91. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/loguru.py +0 -0
  92. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/modules.py +0 -0
  93. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai.py +0 -0
  94. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/__init__.py +0 -0
  95. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/consts.py +0 -0
  96. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/patches/__init__.py +0 -0
  97. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/patches/agent_run.py +0 -0
  98. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/patches/models.py +0 -0
  99. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/patches/runner.py +0 -0
  100. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/patches/tools.py +0 -0
  101. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/spans/__init__.py +0 -0
  102. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/spans/agent_workflow.py +0 -0
  103. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/spans/ai_client.py +0 -0
  104. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/spans/handoff.py +0 -0
  105. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/spans/invoke_agent.py +0 -0
  106. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openai_agents/utils.py +0 -0
  107. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/openfeature.py +0 -0
  108. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/opentelemetry/__init__.py +0 -0
  109. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/opentelemetry/consts.py +0 -0
  110. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/opentelemetry/integration.py +0 -0
  111. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/opentelemetry/propagator.py +0 -0
  112. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/opentelemetry/span_processor.py +0 -0
  113. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/pure_eval.py +0 -0
  114. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/pymongo.py +0 -0
  115. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/pyramid.py +0 -0
  116. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/quart.py +0 -0
  117. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/__init__.py +0 -0
  118. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/_async_common.py +0 -0
  119. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/_sync_common.py +0 -0
  120. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/consts.py +0 -0
  121. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/modules/__init__.py +0 -0
  122. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/modules/caches.py +0 -0
  123. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/modules/queries.py +0 -0
  124. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/rb.py +0 -0
  125. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/redis.py +0 -0
  126. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/redis_cluster.py +0 -0
  127. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/redis_py_cluster_legacy.py +0 -0
  128. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/redis/utils.py +0 -0
  129. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/rq.py +0 -0
  130. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/rust_tracing.py +0 -0
  131. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/sanic.py +0 -0
  132. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/serverless.py +0 -0
  133. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/socket.py +0 -0
  134. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/spark/__init__.py +0 -0
  135. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/spark/spark_driver.py +0 -0
  136. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/spark/spark_worker.py +0 -0
  137. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/sqlalchemy.py +0 -0
  138. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/starlette.py +0 -0
  139. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/starlite.py +0 -0
  140. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/statsig.py +0 -0
  141. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/stdlib.py +0 -0
  142. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/strawberry.py +0 -0
  143. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/sys_exit.py +0 -0
  144. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/threading.py +0 -0
  145. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/tornado.py +0 -0
  146. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/trytond.py +0 -0
  147. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/typer.py +0 -0
  148. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/unleash.py +0 -0
  149. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/integrations/wsgi.py +0 -0
  150. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/logger.py +0 -0
  151. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/metrics.py +0 -0
  152. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/monitor.py +0 -0
  153. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/profiler/__init__.py +0 -0
  154. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/profiler/continuous_profiler.py +0 -0
  155. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/profiler/transaction_profiler.py +0 -0
  156. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/profiler/utils.py +0 -0
  157. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/py.typed +0 -0
  158. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/scope.py +0 -0
  159. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/scrubber.py +0 -0
  160. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/serializer.py +0 -0
  161. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/session.py +0 -0
  162. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/sessions.py +0 -0
  163. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/spotlight.py +0 -0
  164. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/tracing.py +0 -0
  165. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/tracing_utils.py +0 -0
  166. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/transport.py +0 -0
  167. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/types.py +0 -0
  168. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/utils.py +0 -0
  169. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk/worker.py +0 -0
  170. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk.egg-info/SOURCES.txt +0 -0
  171. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk.egg-info/dependency_links.txt +0 -0
  172. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk.egg-info/entry_points.txt +0 -0
  173. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk.egg-info/not-zip-safe +0 -0
  174. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk.egg-info/requires.txt +0 -0
  175. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/sentry_sdk.egg-info/top_level.txt +0 -0
  176. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/setup.cfg +0 -0
  177. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_ai_monitoring.py +0 -0
  178. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_api.py +0 -0
  179. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_basics.py +0 -0
  180. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_client.py +0 -0
  181. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_conftest.py +0 -0
  182. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_crons.py +0 -0
  183. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_dsc.py +0 -0
  184. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_envelope.py +0 -0
  185. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_exceptiongroup.py +0 -0
  186. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_feature_flags.py +0 -0
  187. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_full_stack_frames.py +0 -0
  188. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_import.py +0 -0
  189. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_logs.py +0 -0
  190. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_lru_cache.py +0 -0
  191. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_metrics.py +0 -0
  192. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_monitor.py +0 -0
  193. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_propagationcontext.py +0 -0
  194. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_scope.py +0 -0
  195. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_scrubber.py +0 -0
  196. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_serializer.py +0 -0
  197. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_spotlight.py +0 -0
  198. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_tracing_utils.py +0 -0
  199. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_transport.py +0 -0
  200. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_types.py +0 -0
  201. {sentry_sdk-2.31.0 → sentry_sdk-2.32.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry-sdk
3
- Version: 2.31.0
3
+ Version: 2.32.0
4
4
  Summary: Python client for Sentry (https://sentry.io)
5
5
  Home-page: https://github.com/getsentry/sentry-python
6
6
  Author: Sentry Team and Contributors
@@ -47,6 +47,8 @@ __all__ = [ # noqa
47
47
  "trace",
48
48
  "monitor",
49
49
  "logger",
50
+ "start_session",
51
+ "end_session",
50
52
  ]
51
53
 
52
54
  # Initialize the debug support after everything is loaded
@@ -82,6 +82,8 @@ __all__ = [
82
82
  "start_transaction",
83
83
  "trace",
84
84
  "monitor",
85
+ "start_session",
86
+ "end_session",
85
87
  ]
86
88
 
87
89
 
@@ -450,3 +452,17 @@ def continue_trace(
450
452
  return get_isolation_scope().continue_trace(
451
453
  environ_or_headers, op, name, source, origin
452
454
  )
455
+
456
+
457
+ @scopemethod
458
+ def start_session(
459
+ session_mode="application", # type: str
460
+ ):
461
+ # type: (...) -> None
462
+ return get_isolation_scope().start_session(session_mode=session_mode)
463
+
464
+
465
+ @scopemethod
466
+ def end_session():
467
+ # type: () -> None
468
+ return get_isolation_scope().end_session()
@@ -1181,4 +1181,4 @@ DEFAULT_OPTIONS = _get_default_options()
1181
1181
  del _get_default_options
1182
1182
 
1183
1183
 
1184
- VERSION = "2.31.0"
1184
+ VERSION = "2.32.0"
@@ -145,6 +145,22 @@ class SentryAsgiMiddleware:
145
145
  else:
146
146
  self.__call__ = self._run_asgi2
147
147
 
148
+ def _capture_lifespan_exception(self, exc):
149
+ # type: (Exception) -> None
150
+ """Capture exceptions raise in application lifespan handlers.
151
+
152
+ The separate function is needed to support overriding in derived integrations that use different catching mechanisms.
153
+ """
154
+ return _capture_exception(exc=exc, mechanism_type=self.mechanism_type)
155
+
156
+ def _capture_request_exception(self, exc):
157
+ # type: (Exception) -> None
158
+ """Capture exceptions raised in incoming request handlers.
159
+
160
+ The separate function is needed to support overriding in derived integrations that use different catching mechanisms.
161
+ """
162
+ return _capture_exception(exc=exc, mechanism_type=self.mechanism_type)
163
+
148
164
  def _run_asgi2(self, scope):
149
165
  # type: (Any) -> Any
150
166
  async def inner(receive, send):
@@ -158,7 +174,7 @@ class SentryAsgiMiddleware:
158
174
  return await self._run_app(scope, receive, send, asgi_version=3)
159
175
 
160
176
  async def _run_app(self, scope, receive, send, asgi_version):
161
- # type: (Any, Any, Any, Any, int) -> Any
177
+ # type: (Any, Any, Any, int) -> Any
162
178
  is_recursive_asgi_middleware = _asgi_middleware_applied.get(False)
163
179
  is_lifespan = scope["type"] == "lifespan"
164
180
  if is_recursive_asgi_middleware or is_lifespan:
@@ -169,7 +185,7 @@ class SentryAsgiMiddleware:
169
185
  return await self.app(scope, receive, send)
170
186
 
171
187
  except Exception as exc:
172
- _capture_exception(exc, mechanism_type=self.mechanism_type)
188
+ self._capture_lifespan_exception(exc)
173
189
  raise exc from None
174
190
 
175
191
  _asgi_middleware_applied.set(True)
@@ -256,7 +272,7 @@ class SentryAsgiMiddleware:
256
272
  scope, receive, _sentry_wrapped_send
257
273
  )
258
274
  except Exception as exc:
259
- _capture_exception(exc, mechanism_type=self.mechanism_type)
275
+ self._capture_request_exception(exc)
260
276
  raise exc from None
261
277
  finally:
262
278
  _asgi_middleware_applied.set(False)
@@ -1,3 +1,4 @@
1
+ import itertools
1
2
  from collections import OrderedDict
2
3
  from functools import wraps
3
4
 
@@ -88,12 +89,9 @@ class WatchedSpan:
88
89
  class SentryLangchainCallback(BaseCallbackHandler): # type: ignore[misc]
89
90
  """Base callback handler that can be used to handle callbacks from langchain."""
90
91
 
91
- span_map = OrderedDict() # type: OrderedDict[UUID, WatchedSpan]
92
-
93
- max_span_map_size = 0
94
-
95
92
  def __init__(self, max_span_map_size, include_prompts, tiktoken_encoding_name=None):
96
93
  # type: (int, bool, Optional[str]) -> None
94
+ self.span_map = OrderedDict() # type: OrderedDict[UUID, WatchedSpan]
97
95
  self.max_span_map_size = max_span_map_size
98
96
  self.include_prompts = include_prompts
99
97
 
@@ -451,7 +449,14 @@ def _wrap_configure(f):
451
449
  **kwargs,
452
450
  )
453
451
 
454
- if not any(isinstance(cb, SentryLangchainCallback) for cb in callbacks_list):
452
+ inheritable_callbacks_list = (
453
+ inheritable_callbacks if isinstance(inheritable_callbacks, list) else []
454
+ )
455
+
456
+ if not any(
457
+ isinstance(cb, SentryLangchainCallback)
458
+ for cb in itertools.chain(callbacks_list, inheritable_callbacks_list)
459
+ ):
455
460
  # Avoid mutating the existing callbacks list
456
461
  callbacks_list = [
457
462
  *callbacks_list,
@@ -87,6 +87,15 @@ class SentryLitestarASGIMiddleware(SentryAsgiMiddleware):
87
87
  span_origin=span_origin,
88
88
  )
89
89
 
90
+ def _capture_request_exception(self, exc):
91
+ # type: (Exception) -> None
92
+ """Avoid catching exceptions from request handlers.
93
+
94
+ Those exceptions are already handled in Litestar.after_exception handler.
95
+ We still catch exceptions from application lifespan handlers.
96
+ """
97
+ pass
98
+
90
99
 
91
100
  def patch_app_init():
92
101
  # type: () -> None
@@ -1,5 +1,5 @@
1
1
  import sentry_sdk
2
- from sentry_sdk.consts import OP, SPANDATA
2
+ from sentry_sdk.consts import OP, SPANDATA, SPANSTATUS
3
3
  from sentry_sdk.scope import should_send_default_pii
4
4
 
5
5
  from ..consts import SPAN_ORIGIN
@@ -39,5 +39,10 @@ def update_execute_tool_span(span, agent, tool, result):
39
39
  # type: (sentry_sdk.tracing.Span, agents.Agent, agents.Tool, Any) -> None
40
40
  _set_agent_data(span, agent)
41
41
 
42
+ if isinstance(result, str) and result.startswith(
43
+ "An error occurred while running the tool"
44
+ ):
45
+ span.set_status(SPANSTATUS.INTERNAL_ERROR)
46
+
42
47
  if should_send_default_pii():
43
48
  span.set_data(SPANDATA.GEN_AI_TOOL_OUTPUT, result)
@@ -0,0 +1,149 @@
1
+ import inspect
2
+ import sys
3
+
4
+ import sentry_sdk
5
+ from sentry_sdk.consts import OP, SPANSTATUS
6
+ from sentry_sdk.integrations import _check_minimum_version, DidNotEnable, Integration
7
+ from sentry_sdk.tracing import TransactionSource
8
+ from sentry_sdk.utils import (
9
+ event_from_exception,
10
+ logger,
11
+ package_version,
12
+ qualname_from_function,
13
+ reraise,
14
+ )
15
+
16
+ try:
17
+ import ray # type: ignore[import-not-found]
18
+ except ImportError:
19
+ raise DidNotEnable("Ray not installed.")
20
+ import functools
21
+
22
+ from typing import TYPE_CHECKING
23
+
24
+ if TYPE_CHECKING:
25
+ from collections.abc import Callable
26
+ from typing import Any, Optional
27
+ from sentry_sdk.utils import ExcInfo
28
+
29
+
30
+ def _check_sentry_initialized():
31
+ # type: () -> None
32
+ if sentry_sdk.get_client().is_active():
33
+ return
34
+
35
+ logger.debug(
36
+ "[Tracing] Sentry not initialized in ray cluster worker, performance data will be discarded."
37
+ )
38
+
39
+
40
+ def _patch_ray_remote():
41
+ # type: () -> None
42
+ old_remote = ray.remote
43
+
44
+ @functools.wraps(old_remote)
45
+ def new_remote(f=None, *args, **kwargs):
46
+ # type: (Optional[Callable[..., Any]], *Any, **Any) -> Callable[..., Any]
47
+
48
+ if inspect.isclass(f):
49
+ # Ray Actors
50
+ # (https://docs.ray.io/en/latest/ray-core/actors.html)
51
+ # are not supported
52
+ # (Only Ray Tasks are supported)
53
+ return old_remote(f, *args, **kwargs)
54
+
55
+ def wrapper(user_f):
56
+ # type: (Callable[..., Any]) -> Any
57
+ def new_func(*f_args, _tracing=None, **f_kwargs):
58
+ # type: (Any, Optional[dict[str, Any]], Any) -> Any
59
+ _check_sentry_initialized()
60
+
61
+ transaction = sentry_sdk.continue_trace(
62
+ _tracing or {},
63
+ op=OP.QUEUE_TASK_RAY,
64
+ name=qualname_from_function(user_f),
65
+ origin=RayIntegration.origin,
66
+ source=TransactionSource.TASK,
67
+ )
68
+
69
+ with sentry_sdk.start_transaction(transaction) as transaction:
70
+ try:
71
+ result = user_f(*f_args, **f_kwargs)
72
+ transaction.set_status(SPANSTATUS.OK)
73
+ except Exception:
74
+ transaction.set_status(SPANSTATUS.INTERNAL_ERROR)
75
+ exc_info = sys.exc_info()
76
+ _capture_exception(exc_info)
77
+ reraise(*exc_info)
78
+
79
+ return result
80
+
81
+ if f:
82
+ rv = old_remote(new_func)
83
+ else:
84
+ rv = old_remote(*args, **kwargs)(new_func)
85
+ old_remote_method = rv.remote
86
+
87
+ def _remote_method_with_header_propagation(*args, **kwargs):
88
+ # type: (*Any, **Any) -> Any
89
+ """
90
+ Ray Client
91
+ """
92
+ with sentry_sdk.start_span(
93
+ op=OP.QUEUE_SUBMIT_RAY,
94
+ name=qualname_from_function(user_f),
95
+ origin=RayIntegration.origin,
96
+ ) as span:
97
+ tracing = {
98
+ k: v
99
+ for k, v in sentry_sdk.get_current_scope().iter_trace_propagation_headers()
100
+ }
101
+ try:
102
+ result = old_remote_method(*args, **kwargs, _tracing=tracing)
103
+ span.set_status(SPANSTATUS.OK)
104
+ except Exception:
105
+ span.set_status(SPANSTATUS.INTERNAL_ERROR)
106
+ exc_info = sys.exc_info()
107
+ _capture_exception(exc_info)
108
+ reraise(*exc_info)
109
+
110
+ return result
111
+
112
+ rv.remote = _remote_method_with_header_propagation
113
+
114
+ return rv
115
+
116
+ if f is not None:
117
+ return wrapper(f)
118
+ else:
119
+ return wrapper
120
+
121
+ ray.remote = new_remote
122
+
123
+
124
+ def _capture_exception(exc_info, **kwargs):
125
+ # type: (ExcInfo, **Any) -> None
126
+ client = sentry_sdk.get_client()
127
+
128
+ event, hint = event_from_exception(
129
+ exc_info,
130
+ client_options=client.options,
131
+ mechanism={
132
+ "handled": False,
133
+ "type": RayIntegration.identifier,
134
+ },
135
+ )
136
+ sentry_sdk.capture_event(event, hint=hint)
137
+
138
+
139
+ class RayIntegration(Integration):
140
+ identifier = "ray"
141
+ origin = f"auto.queue.{identifier}"
142
+
143
+ @staticmethod
144
+ def setup_once():
145
+ # type: () -> None
146
+ version = package_version("ray")
147
+ _check_minimum_version(RayIntegration, version)
148
+
149
+ _patch_ray_remote()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry-sdk
3
- Version: 2.31.0
3
+ Version: 2.32.0
4
4
  Summary: Python client for Sentry (https://sentry.io)
5
5
  Home-page: https://github.com/getsentry/sentry-python
6
6
  Author: Sentry Team and Contributors
@@ -21,7 +21,7 @@ def get_file_text(file_name):
21
21
 
22
22
  setup(
23
23
  name="sentry-sdk",
24
- version="2.31.0",
24
+ version="2.32.0",
25
25
  author="Sentry Team and Contributors",
26
26
  author_email="hello@sentry.io",
27
27
  url="https://github.com/getsentry/sentry-python",
@@ -246,3 +246,52 @@ def test_no_thread_on_shutdown_no_errors_deprecated(
246
246
  sentry_sdk.flush()
247
247
 
248
248
  # If we reach this point without error, the test is successful.
249
+
250
+
251
+ def test_top_level_start_session_basic(sentry_init, capture_envelopes):
252
+ """Test that top-level start_session starts a session on the isolation scope."""
253
+ sentry_init(release="test-release", environment="test-env")
254
+ envelopes = capture_envelopes()
255
+
256
+ # Start a session using the top-level API
257
+ sentry_sdk.start_session()
258
+
259
+ # End the session
260
+ sentry_sdk.end_session()
261
+ sentry_sdk.flush()
262
+
263
+ # Check that we got a session envelope
264
+ assert len(envelopes) == 1
265
+ sess = envelopes[0]
266
+ assert len(sess.items) == 1
267
+ sess_event = sess.items[0].payload.json
268
+
269
+ assert sess_event["attrs"] == {
270
+ "release": "test-release",
271
+ "environment": "test-env",
272
+ }
273
+ assert sess_event["status"] == "exited"
274
+
275
+
276
+ def test_top_level_start_session_with_mode(sentry_init, capture_envelopes):
277
+ """Test that top-level start_session accepts session_mode parameter."""
278
+ sentry_init(release="test-release", environment="test-env")
279
+ envelopes = capture_envelopes()
280
+
281
+ # Start a session with request mode
282
+ sentry_sdk.start_session(session_mode="request")
283
+ sentry_sdk.end_session()
284
+ sentry_sdk.flush()
285
+
286
+ # Request mode sessions are aggregated
287
+ assert len(envelopes) == 1
288
+ sess = envelopes[0]
289
+ assert len(sess.items) == 1
290
+ sess_event = sess.items[0].payload.json
291
+
292
+ assert sess_event["attrs"] == {
293
+ "release": "test-release",
294
+ "environment": "test-env",
295
+ }
296
+ # Request sessions show up as aggregates
297
+ assert "aggregates" in sess_event
@@ -1,141 +0,0 @@
1
- import inspect
2
- import sys
3
-
4
- import sentry_sdk
5
- from sentry_sdk.consts import OP, SPANSTATUS
6
- from sentry_sdk.integrations import _check_minimum_version, DidNotEnable, Integration
7
- from sentry_sdk.tracing import TransactionSource
8
- from sentry_sdk.utils import (
9
- event_from_exception,
10
- logger,
11
- package_version,
12
- qualname_from_function,
13
- reraise,
14
- )
15
-
16
- try:
17
- import ray # type: ignore[import-not-found]
18
- except ImportError:
19
- raise DidNotEnable("Ray not installed.")
20
- import functools
21
-
22
- from typing import TYPE_CHECKING
23
-
24
- if TYPE_CHECKING:
25
- from collections.abc import Callable
26
- from typing import Any, Optional
27
- from sentry_sdk.utils import ExcInfo
28
-
29
-
30
- def _check_sentry_initialized():
31
- # type: () -> None
32
- if sentry_sdk.get_client().is_active():
33
- return
34
-
35
- logger.debug(
36
- "[Tracing] Sentry not initialized in ray cluster worker, performance data will be discarded."
37
- )
38
-
39
-
40
- def _patch_ray_remote():
41
- # type: () -> None
42
- old_remote = ray.remote
43
-
44
- @functools.wraps(old_remote)
45
- def new_remote(f, *args, **kwargs):
46
- # type: (Callable[..., Any], *Any, **Any) -> Callable[..., Any]
47
- if inspect.isclass(f):
48
- # Ray Actors
49
- # (https://docs.ray.io/en/latest/ray-core/actors.html)
50
- # are not supported
51
- # (Only Ray Tasks are supported)
52
- return old_remote(f, *args, *kwargs)
53
-
54
- def _f(*f_args, _tracing=None, **f_kwargs):
55
- # type: (Any, Optional[dict[str, Any]], Any) -> Any
56
- """
57
- Ray Worker
58
- """
59
- _check_sentry_initialized()
60
-
61
- transaction = sentry_sdk.continue_trace(
62
- _tracing or {},
63
- op=OP.QUEUE_TASK_RAY,
64
- name=qualname_from_function(f),
65
- origin=RayIntegration.origin,
66
- source=TransactionSource.TASK,
67
- )
68
-
69
- with sentry_sdk.start_transaction(transaction) as transaction:
70
- try:
71
- result = f(*f_args, **f_kwargs)
72
- transaction.set_status(SPANSTATUS.OK)
73
- except Exception:
74
- transaction.set_status(SPANSTATUS.INTERNAL_ERROR)
75
- exc_info = sys.exc_info()
76
- _capture_exception(exc_info)
77
- reraise(*exc_info)
78
-
79
- return result
80
-
81
- rv = old_remote(_f, *args, *kwargs)
82
- old_remote_method = rv.remote
83
-
84
- def _remote_method_with_header_propagation(*args, **kwargs):
85
- # type: (*Any, **Any) -> Any
86
- """
87
- Ray Client
88
- """
89
- with sentry_sdk.start_span(
90
- op=OP.QUEUE_SUBMIT_RAY,
91
- name=qualname_from_function(f),
92
- origin=RayIntegration.origin,
93
- ) as span:
94
- tracing = {
95
- k: v
96
- for k, v in sentry_sdk.get_current_scope().iter_trace_propagation_headers()
97
- }
98
- try:
99
- result = old_remote_method(*args, **kwargs, _tracing=tracing)
100
- span.set_status(SPANSTATUS.OK)
101
- except Exception:
102
- span.set_status(SPANSTATUS.INTERNAL_ERROR)
103
- exc_info = sys.exc_info()
104
- _capture_exception(exc_info)
105
- reraise(*exc_info)
106
-
107
- return result
108
-
109
- rv.remote = _remote_method_with_header_propagation
110
-
111
- return rv
112
-
113
- ray.remote = new_remote
114
-
115
-
116
- def _capture_exception(exc_info, **kwargs):
117
- # type: (ExcInfo, **Any) -> None
118
- client = sentry_sdk.get_client()
119
-
120
- event, hint = event_from_exception(
121
- exc_info,
122
- client_options=client.options,
123
- mechanism={
124
- "handled": False,
125
- "type": RayIntegration.identifier,
126
- },
127
- )
128
- sentry_sdk.capture_event(event, hint=hint)
129
-
130
-
131
- class RayIntegration(Integration):
132
- identifier = "ray"
133
- origin = f"auto.queue.{identifier}"
134
-
135
- @staticmethod
136
- def setup_once():
137
- # type: () -> None
138
- version = package_version("ray")
139
- _check_minimum_version(RayIntegration, version)
140
-
141
- _patch_ray_remote()
File without changes
File without changes
File without changes
File without changes