sentry-sdk 2.62.0__tar.gz → 2.64.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.
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/MANIFEST.in +1 -0
- {sentry_sdk-2.62.0/sentry_sdk.egg-info → sentry_sdk-2.64.0}/PKG-INFO +1 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_log_batcher.py +6 -2
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_metrics_batcher.py +3 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/ai/utils.py +0 -7
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/client.py +7 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/consts.py +40 -8
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/_asgi_common.py +55 -11
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/aiohttp.py +15 -9
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/asgi.py +42 -6
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/asyncpg.py +14 -2
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/aws_lambda.py +75 -18
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/boto3.py +2 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/chalice.py +74 -17
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/clickhouse_driver.py +60 -23
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/cloud_resource_context.py +1 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/__init__.py +40 -4
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/executing.py +2 -2
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/falcon.py +20 -0
- sentry_sdk-2.64.0/sentry_sdk/integrations/fastapi.py +201 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/flask.py +46 -30
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/grpc/aio/server.py +2 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/grpc/server.py +2 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/httpx.py +3 -2
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/httpx2.py +3 -2
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/langchain.py +11 -4
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/langgraph.py +5 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/litellm.py +18 -15
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/litestar.py +119 -70
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/mcp.py +264 -64
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/patches/agent_run.py +19 -5
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/patches/error_tracing.py +11 -3
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/patches/models.py +14 -7
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/patches/runner.py +25 -7
- sentry_sdk-2.64.0/sentry_sdk/integrations/openai_agents/spans/agent_workflow.py +32 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/spans/ai_client.py +30 -13
- sentry_sdk-2.64.0/sentry_sdk/integrations/openai_agents/spans/execute_tool.py +82 -0
- sentry_sdk-2.64.0/sentry_sdk/integrations/openai_agents/spans/handoff.py +41 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/spans/invoke_agent.py +35 -16
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/utils.py +58 -31
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/spans/ai_client.py +7 -4
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py +7 -4
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pymongo.py +1 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pyramid.py +9 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pyreqwest.py +2 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/quart.py +77 -17
- sentry_sdk-2.64.0/sentry_sdk/integrations/ray.py +240 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/_async_common.py +16 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/_sync_common.py +16 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/sanic.py +5 -3
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/starlette.py +108 -58
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/starlite.py +22 -25
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/stdlib.py +6 -5
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/tornado.py +5 -3
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/wsgi.py +10 -6
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/scope.py +16 -7
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/serializer.py +118 -82
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/traces.py +1 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/tracing.py +1 -1
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/tracing_utils.py +11 -3
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/utils.py +20 -24
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0/sentry_sdk.egg-info}/PKG-INFO +1 -1
- sentry_sdk-2.64.0/sentry_sdk.egg-info/SOURCES.txt +507 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/setup.py +1 -1
- sentry_sdk-2.64.0/tests/__init__.py +12 -0
- sentry_sdk-2.64.0/tests/conftest.py +1693 -0
- sentry_sdk-2.64.0/tests/integrations/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/aiohttp/__init__.py +10 -0
- sentry_sdk-2.64.0/tests/integrations/aiohttp/aiohttp_helpers/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/aiohttp/aiohttp_helpers/helpers.py +2 -0
- sentry_sdk-2.64.0/tests/integrations/aiohttp/test_aiohttp.py +1650 -0
- sentry_sdk-2.64.0/tests/integrations/aiomysql/__init__.py +4 -0
- sentry_sdk-2.64.0/tests/integrations/aiomysql/test_aiomysql.py +1154 -0
- sentry_sdk-2.64.0/tests/integrations/anthropic/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/anthropic/test_anthropic.py +6715 -0
- sentry_sdk-2.64.0/tests/integrations/argv/test_argv.py +16 -0
- sentry_sdk-2.64.0/tests/integrations/ariadne/__init__.py +5 -0
- sentry_sdk-2.64.0/tests/integrations/ariadne/test_ariadne.py +276 -0
- sentry_sdk-2.64.0/tests/integrations/arq/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/arq/test_arq.py +671 -0
- sentry_sdk-2.64.0/tests/integrations/asgi/__init__.py +5 -0
- sentry_sdk-2.64.0/tests/integrations/asgi/test_asgi.py +1071 -0
- sentry_sdk-2.64.0/tests/integrations/asyncio/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/asyncio/test_asyncio.py +914 -0
- sentry_sdk-2.64.0/tests/integrations/asyncpg/__init__.py +11 -0
- sentry_sdk-2.64.0/tests/integrations/asyncpg/asyncpg_helpers/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/asyncpg/asyncpg_helpers/helpers.py +2 -0
- sentry_sdk-2.64.0/tests/integrations/asyncpg/test_asyncpg.py +1581 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/__init__.py +5 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions/BasicException/index.py +6 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions/BasicOk/index.py +4 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions/InitError/index.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions/TimeoutError/index.py +8 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreaming/.gitignore +11 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreaming/index.py +15 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreamingPii/.gitignore +11 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreamingPii/index.py +16 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceDisabled/.gitignore +11 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceDisabled/index.py +14 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceEnabled/.gitignore +11 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorPerformanceEnabled/index.py +14 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorSpanStreaming/.gitignore +11 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/RaiseErrorSpanStreaming/index.py +15 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TimeoutErrorScopeModified/.gitignore +11 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TimeoutErrorScopeModified/index.py +19 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TracesSampler/.gitignore +11 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/lambda_functions_with_embedded_sdk/TracesSampler/index.py +50 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/test_aws_lambda.py +756 -0
- sentry_sdk-2.64.0/tests/integrations/aws_lambda/utils.py +282 -0
- sentry_sdk-2.64.0/tests/integrations/beam/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/beam/test_beam.py +218 -0
- sentry_sdk-2.64.0/tests/integrations/boto3/__init__.py +11 -0
- sentry_sdk-2.64.0/tests/integrations/boto3/aws_mock.py +34 -0
- sentry_sdk-2.64.0/tests/integrations/boto3/s3_list.xml +2 -0
- sentry_sdk-2.64.0/tests/integrations/boto3/test_s3.py +362 -0
- sentry_sdk-2.64.0/tests/integrations/bottle/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/bottle/test_bottle.py +809 -0
- sentry_sdk-2.64.0/tests/integrations/celery/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/celery/integration_tests/__init__.py +58 -0
- sentry_sdk-2.64.0/tests/integrations/celery/integration_tests/test_celery_beat_cron_monitoring.py +157 -0
- sentry_sdk-2.64.0/tests/integrations/celery/test_celery.py +1204 -0
- sentry_sdk-2.64.0/tests/integrations/celery/test_celery_beat_crons.py +499 -0
- sentry_sdk-2.64.0/tests/integrations/celery/test_update_celery_task_headers.py +227 -0
- sentry_sdk-2.64.0/tests/integrations/chalice/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/chalice/test_chalice.py +261 -0
- sentry_sdk-2.64.0/tests/integrations/clickhouse_driver/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/clickhouse_driver/test_clickhouse_driver.py +1528 -0
- sentry_sdk-2.64.0/tests/integrations/cloud_resource_context/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/cloud_resource_context/test_cloud_resource_context.py +410 -0
- sentry_sdk-2.64.0/tests/integrations/cohere/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/cohere/test_cohere.py +456 -0
- sentry_sdk-2.64.0/tests/integrations/conftest.py +56 -0
- sentry_sdk-2.64.0/tests/integrations/django/__init__.py +10 -0
- sentry_sdk-2.64.0/tests/integrations/django/asgi/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/django/asgi/image.png +0 -0
- sentry_sdk-2.64.0/tests/integrations/django/asgi/test_asgi.py +1051 -0
- sentry_sdk-2.64.0/tests/integrations/django/django_helpers/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/django/django_helpers/views.py +9 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/asgi.py +21 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/custom_urls.py +31 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/manage.py +12 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/management/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/management/commands/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/management/commands/mycrash.py +9 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/middleware.py +31 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/routing.py +18 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/settings.py +173 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/signals.py +15 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/templates/error.html +20 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/templates/trace_meta.html +1 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/templates/user_name.html +1 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/urls.py +162 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/views.py +371 -0
- sentry_sdk-2.64.0/tests/integrations/django/myapp/wsgi.py +18 -0
- sentry_sdk-2.64.0/tests/integrations/django/test_basic.py +2485 -0
- sentry_sdk-2.64.0/tests/integrations/django/test_cache_module.py +1150 -0
- sentry_sdk-2.64.0/tests/integrations/django/test_data_scrubbing.py +101 -0
- sentry_sdk-2.64.0/tests/integrations/django/test_db_query_data.py +969 -0
- sentry_sdk-2.64.0/tests/integrations/django/test_db_transactions.py +1902 -0
- sentry_sdk-2.64.0/tests/integrations/django/test_middleware.py +33 -0
- sentry_sdk-2.64.0/tests/integrations/django/test_tasks.py +306 -0
- sentry_sdk-2.64.0/tests/integrations/django/test_transactions.py +152 -0
- sentry_sdk-2.64.0/tests/integrations/django/utils.py +21 -0
- sentry_sdk-2.64.0/tests/integrations/dramatiq/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/dramatiq/test_dramatiq.py +556 -0
- sentry_sdk-2.64.0/tests/integrations/excepthook/test_excepthook.py +86 -0
- sentry_sdk-2.64.0/tests/integrations/falcon/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/falcon/test_falcon.py +790 -0
- sentry_sdk-2.64.0/tests/integrations/fastapi/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/fastapi/photo.jpg +0 -0
- sentry_sdk-2.64.0/tests/integrations/fastapi/test_fastapi.py +1195 -0
- sentry_sdk-2.64.0/tests/integrations/fastmcp/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/fastmcp/test_fastmcp.py +1904 -0
- sentry_sdk-2.64.0/tests/integrations/flask/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/flask/test_flask.py +1222 -0
- sentry_sdk-2.64.0/tests/integrations/gcp/__init__.py +6 -0
- sentry_sdk-2.64.0/tests/integrations/gcp/test_gcp.py +788 -0
- sentry_sdk-2.64.0/tests/integrations/google_genai/__init__.py +4 -0
- sentry_sdk-2.64.0/tests/integrations/google_genai/test_google_genai.py +3409 -0
- sentry_sdk-2.64.0/tests/integrations/gql/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/gql/test_gql.py +149 -0
- sentry_sdk-2.64.0/tests/integrations/graphene/__init__.py +5 -0
- sentry_sdk-2.64.0/tests/integrations/graphene/test_graphene.py +400 -0
- sentry_sdk-2.64.0/tests/integrations/grpc/__init__.py +8 -0
- sentry_sdk-2.64.0/tests/integrations/grpc/compile_test_services.sh +15 -0
- sentry_sdk-2.64.0/tests/integrations/grpc/grpc_test_service_pb2.py +27 -0
- sentry_sdk-2.64.0/tests/integrations/grpc/grpc_test_service_pb2.pyi +13 -0
- sentry_sdk-2.64.0/tests/integrations/grpc/grpc_test_service_pb2_grpc.py +165 -0
- sentry_sdk-2.64.0/tests/integrations/grpc/protos/grpc_test_service.proto +14 -0
- sentry_sdk-2.64.0/tests/integrations/grpc/test_grpc.py +798 -0
- sentry_sdk-2.64.0/tests/integrations/grpc/test_grpc_aio.py +584 -0
- sentry_sdk-2.64.0/tests/integrations/httpx/__init__.py +10 -0
- sentry_sdk-2.64.0/tests/integrations/httpx/httpx_helpers/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/httpx/httpx_helpers/helpers.py +6 -0
- sentry_sdk-2.64.0/tests/integrations/httpx/test_httpx.py +1203 -0
- sentry_sdk-2.64.0/tests/integrations/httpx2/__init__.py +10 -0
- sentry_sdk-2.64.0/tests/integrations/httpx2/httpx2_helpers/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/httpx2/httpx2_helpers/helpers.py +6 -0
- sentry_sdk-2.64.0/tests/integrations/httpx2/test_httpx2.py +1218 -0
- sentry_sdk-2.64.0/tests/integrations/huey/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/huey/test_huey.py +618 -0
- sentry_sdk-2.64.0/tests/integrations/huggingface_hub/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/huggingface_hub/test_huggingface_hub.py +1567 -0
- sentry_sdk-2.64.0/tests/integrations/langchain/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/langchain/test_langchain.py +4979 -0
- sentry_sdk-2.64.0/tests/integrations/langgraph/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/langgraph/test_langgraph.py +2134 -0
- sentry_sdk-2.64.0/tests/integrations/launchdarkly/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/launchdarkly/test_launchdarkly.py +283 -0
- sentry_sdk-2.64.0/tests/integrations/litellm/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/litellm/test_litellm.py +3417 -0
- sentry_sdk-2.64.0/tests/integrations/litestar/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/litestar/test_litestar.py +820 -0
- sentry_sdk-2.64.0/tests/integrations/logging/test_logging.py +645 -0
- sentry_sdk-2.64.0/tests/integrations/loguru/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/loguru/test_loguru.py +588 -0
- sentry_sdk-2.64.0/tests/integrations/mcp/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/mcp/test_mcp.py +2036 -0
- sentry_sdk-2.64.0/tests/integrations/modules/test_modules.py +13 -0
- sentry_sdk-2.64.0/tests/integrations/openai/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/openai/test_openai.py +6049 -0
- sentry_sdk-2.64.0/tests/integrations/openai_agents/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/openai_agents/test_openai_agents.py +5670 -0
- sentry_sdk-2.64.0/tests/integrations/openfeature/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/openfeature/test_openfeature.py +204 -0
- sentry_sdk-2.64.0/tests/integrations/opentelemetry/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/opentelemetry/test_entry_points.py +26 -0
- sentry_sdk-2.64.0/tests/integrations/opentelemetry/test_experimental.py +57 -0
- sentry_sdk-2.64.0/tests/integrations/opentelemetry/test_propagator.py +322 -0
- sentry_sdk-2.64.0/tests/integrations/opentelemetry/test_span_processor.py +635 -0
- sentry_sdk-2.64.0/tests/integrations/otlp/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/otlp/test_otlp.py +368 -0
- sentry_sdk-2.64.0/tests/integrations/pure_eval/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/pure_eval/test_pure_eval.py +88 -0
- sentry_sdk-2.64.0/tests/integrations/pydantic_ai/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/pydantic_ai/test_pydantic_ai.py +4586 -0
- sentry_sdk-2.64.0/tests/integrations/pymongo/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/pymongo/test_pymongo.py +644 -0
- sentry_sdk-2.64.0/tests/integrations/pyramid/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/pyramid/test_pyramid.py +598 -0
- sentry_sdk-2.64.0/tests/integrations/pyreqwest/__init__.py +10 -0
- sentry_sdk-2.64.0/tests/integrations/pyreqwest/pyreqwest_helpers/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/pyreqwest/pyreqwest_helpers/helpers.py +2 -0
- sentry_sdk-2.64.0/tests/integrations/pyreqwest/test_pyreqwest.py +958 -0
- sentry_sdk-2.64.0/tests/integrations/quart/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/quart/test_quart.py +970 -0
- sentry_sdk-2.64.0/tests/integrations/ray/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/ray/test_ray.py +536 -0
- sentry_sdk-2.64.0/tests/integrations/redis/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/redis/asyncio/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/redis/asyncio/test_redis_asyncio.py +172 -0
- sentry_sdk-2.64.0/tests/integrations/redis/cluster/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/redis/cluster/test_redis_cluster.py +273 -0
- sentry_sdk-2.64.0/tests/integrations/redis/cluster_asyncio/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/redis/cluster_asyncio/test_redis_cluster_asyncio.py +262 -0
- sentry_sdk-2.64.0/tests/integrations/redis/test_redis.py +560 -0
- sentry_sdk-2.64.0/tests/integrations/redis/test_redis_cache_module.py +529 -0
- sentry_sdk-2.64.0/tests/integrations/redis/test_redis_cache_module_async.py +329 -0
- sentry_sdk-2.64.0/tests/integrations/redis_py_cluster_legacy/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/redis_py_cluster_legacy/test_redis_py_cluster_legacy.py +171 -0
- sentry_sdk-2.64.0/tests/integrations/requests/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/requests/test_requests.py +114 -0
- sentry_sdk-2.64.0/tests/integrations/rq/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/rq/test_rq.py +554 -0
- sentry_sdk-2.64.0/tests/integrations/rust_tracing/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/rust_tracing/test_rust_tracing.py +803 -0
- sentry_sdk-2.64.0/tests/integrations/sanic/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/sanic/test_sanic.py +600 -0
- sentry_sdk-2.64.0/tests/integrations/serverless/test_serverless.py +44 -0
- sentry_sdk-2.64.0/tests/integrations/socket/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/socket/test_socket.py +152 -0
- sentry_sdk-2.64.0/tests/integrations/spark/__init__.py +4 -0
- sentry_sdk-2.64.0/tests/integrations/spark/test_spark.py +348 -0
- sentry_sdk-2.64.0/tests/integrations/sqlalchemy/__init__.py +10 -0
- sentry_sdk-2.64.0/tests/integrations/sqlalchemy/sqlalchemy_helpers/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/sqlalchemy/sqlalchemy_helpers/helpers.py +7 -0
- sentry_sdk-2.64.0/tests/integrations/sqlalchemy/test_sqlalchemy.py +1231 -0
- sentry_sdk-2.64.0/tests/integrations/starlette/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/starlette/photo.jpg +0 -0
- sentry_sdk-2.64.0/tests/integrations/starlette/templates/trace_meta.html +1 -0
- sentry_sdk-2.64.0/tests/integrations/starlette/test_starlette.py +1618 -0
- sentry_sdk-2.64.0/tests/integrations/starlite/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/starlite/test_starlite.py +576 -0
- sentry_sdk-2.64.0/tests/integrations/statsig/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/statsig/test_statsig.py +228 -0
- sentry_sdk-2.64.0/tests/integrations/stdlib/__init__.py +6 -0
- sentry_sdk-2.64.0/tests/integrations/stdlib/httplib_helpers/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/stdlib/httplib_helpers/helpers.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/stdlib/test_httplib.py +1255 -0
- sentry_sdk-2.64.0/tests/integrations/stdlib/test_subprocess.py +415 -0
- sentry_sdk-2.64.0/tests/integrations/strawberry/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/integrations/strawberry/test_strawberry.py +1096 -0
- sentry_sdk-2.64.0/tests/integrations/sys_exit/test_sys_exit.py +71 -0
- sentry_sdk-2.64.0/tests/integrations/test_gnu_backtrace.py +84 -0
- sentry_sdk-2.64.0/tests/integrations/threading/test_threading.py +349 -0
- sentry_sdk-2.64.0/tests/integrations/tornado/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/tornado/test_tornado.py +577 -0
- sentry_sdk-2.64.0/tests/integrations/trytond/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/trytond/test_trytond.py +144 -0
- sentry_sdk-2.64.0/tests/integrations/typer/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/typer/test_typer.py +52 -0
- sentry_sdk-2.64.0/tests/integrations/unleash/__init__.py +3 -0
- sentry_sdk-2.64.0/tests/integrations/unleash/test_unleash.py +212 -0
- sentry_sdk-2.64.0/tests/integrations/unleash/testutils.py +45 -0
- sentry_sdk-2.64.0/tests/integrations/unraisablehook/test_unraisablehook.py +53 -0
- sentry_sdk-2.64.0/tests/integrations/wsgi/test_wsgi.py +890 -0
- sentry_sdk-2.64.0/tests/new_scopes_compat/__init__.py +7 -0
- sentry_sdk-2.64.0/tests/new_scopes_compat/conftest.py +9 -0
- sentry_sdk-2.64.0/tests/new_scopes_compat/test_new_scopes_compat.py +275 -0
- sentry_sdk-2.64.0/tests/new_scopes_compat/test_new_scopes_compat_event.py +498 -0
- sentry_sdk-2.64.0/tests/profiler/__init__.py +0 -0
- sentry_sdk-2.64.0/tests/profiler/test_continuous_profiler.py +688 -0
- sentry_sdk-2.64.0/tests/profiler/test_transaction_profiler.py +838 -0
- sentry_sdk-2.64.0/tests/test.key +52 -0
- sentry_sdk-2.64.0/tests/test.pem +30 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_attributes.py +38 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_gevent.py +6 -8
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_logs.py +17 -3
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_metrics.py +8 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_serializer.py +24 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_transport.py +2 -4
- sentry_sdk-2.64.0/tests/tracing/test_baggage.py +77 -0
- sentry_sdk-2.64.0/tests/tracing/test_decorator.py +595 -0
- sentry_sdk-2.64.0/tests/tracing/test_deprecated.py +38 -0
- sentry_sdk-2.64.0/tests/tracing/test_http_headers.py +56 -0
- sentry_sdk-2.64.0/tests/tracing/test_ignore_status_codes.py +139 -0
- sentry_sdk-2.64.0/tests/tracing/test_integration_tests.py +432 -0
- sentry_sdk-2.64.0/tests/tracing/test_misc.py +792 -0
- sentry_sdk-2.64.0/tests/tracing/test_noop_span.py +52 -0
- sentry_sdk-2.64.0/tests/tracing/test_propagation.py +41 -0
- sentry_sdk-2.64.0/tests/tracing/test_sample_rand.py +56 -0
- sentry_sdk-2.64.0/tests/tracing/test_sample_rand_propagation.py +43 -0
- sentry_sdk-2.64.0/tests/tracing/test_sampling.py +324 -0
- sentry_sdk-2.64.0/tests/tracing/test_span_batcher.py +496 -0
- sentry_sdk-2.64.0/tests/tracing/test_span_name.py +59 -0
- sentry_sdk-2.64.0/tests/tracing/test_span_origin.py +38 -0
- sentry_sdk-2.64.0/tests/tracing/test_span_streaming.py +1734 -0
- sentry_sdk-2.64.0/tests/utils/__init__.py +1 -0
- sentry_sdk-2.64.0/tests/utils/test_contextvars.py +52 -0
- sentry_sdk-2.64.0/tests/utils/test_general.py +660 -0
- sentry_sdk-2.64.0/tests/utils/test_transaction.py +54 -0
- sentry_sdk-2.62.0/sentry_sdk/integrations/fastapi.py +0 -159
- sentry_sdk-2.62.0/sentry_sdk/integrations/openai_agents/spans/agent_workflow.py +0 -19
- sentry_sdk-2.62.0/sentry_sdk/integrations/openai_agents/spans/execute_tool.py +0 -56
- sentry_sdk-2.62.0/sentry_sdk/integrations/openai_agents/spans/handoff.py +0 -25
- sentry_sdk-2.62.0/sentry_sdk/integrations/ray.py +0 -182
- sentry_sdk-2.62.0/sentry_sdk.egg-info/SOURCES.txt +0 -235
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/LICENSE +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/README.md +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/pyproject.toml +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_batcher.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_compat.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_init_implementation.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_lru_cache.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_queue.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_span_batcher.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_types.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/_werkzeug.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/ai/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/ai/_openai_completions_api.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/ai/_openai_responses_api.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/ai/consts.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/ai/monitoring.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/api.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/attachments.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/crons/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/crons/api.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/crons/consts.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/crons/decorator.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/debug.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/envelope.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/feature_flags.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/hub.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/_wsgi_common.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/aiomysql.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/anthropic.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/argv.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/ariadne.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/arq.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/asyncio.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/atexit.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/beam.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/bottle.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/celery/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/celery/beat.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/celery/utils.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/cohere.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/dedupe.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/asgi.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/caching.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/middleware.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/signals_handlers.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/tasks.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/templates.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/transactions.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/django/views.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/dramatiq.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/excepthook.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/gcp.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/gnu_backtrace.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/google_genai/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/google_genai/consts.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/google_genai/streaming.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/google_genai/utils.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/gql.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/graphene.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/grpc/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/grpc/aio/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/grpc/aio/client.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/grpc/client.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/grpc/consts.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/huey.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/huggingface_hub.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/launchdarkly.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/logging.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/loguru.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/modules.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/consts.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/patches/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/patches/tools.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openai_agents/spans/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/openfeature.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/opentelemetry/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/opentelemetry/consts.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/opentelemetry/integration.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/opentelemetry/propagator.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/opentelemetry/span_processor.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/otlp.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pure_eval.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/consts.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/patches/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/patches/agent_run.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/patches/graph_nodes.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/patches/tools.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/spans/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/spans/execute_tool.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/spans/utils.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/pydantic_ai/utils.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/consts.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/modules/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/modules/caches.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/modules/queries.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/rb.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/redis.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/redis_cluster.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/redis_py_cluster_legacy.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/redis/utils.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/rq.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/rust_tracing.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/serverless.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/socket.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/spark/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/spark/spark_driver.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/spark/spark_worker.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/sqlalchemy.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/statsig.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/strawberry.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/sys_exit.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/threading.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/trytond.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/typer.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/unleash.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/integrations/unraisablehook.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/logger.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/metrics.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/monitor.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/profiler/__init__.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/profiler/continuous_profiler.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/profiler/transaction_profiler.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/profiler/utils.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/py.typed +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/scrubber.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/session.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/sessions.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/spotlight.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/transport.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/types.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk/worker.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk.egg-info/dependency_links.txt +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk.egg-info/entry_points.txt +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk.egg-info/not-zip-safe +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk.egg-info/requires.txt +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/sentry_sdk.egg-info/top_level.txt +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/setup.cfg +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_ai_integration_deactivation.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_ai_monitoring.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_api.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_basics.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_client.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_conftest.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_crons.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_dsc.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_envelope.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_exceptiongroup.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_feature_flags.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_full_stack_frames.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_import.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_lru_cache.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_monitor.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_propagationcontext.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_scope.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_scrubber.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_sessions.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_shadowed_module.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_spotlight.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_tracing_utils.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_types.py +0 -0
- {sentry_sdk-2.62.0 → sentry_sdk-2.64.0}/tests/test_utils.py +0 -0
|
@@ -27,8 +27,6 @@ class LogBatcher(Batcher["Log"]):
|
|
|
27
27
|
|
|
28
28
|
res = {
|
|
29
29
|
"timestamp": int(item["time_unix_nano"]) / 1.0e9,
|
|
30
|
-
"trace_id": item.get("trace_id", "00000000-0000-0000-0000-000000000000"),
|
|
31
|
-
"span_id": item.get("span_id"),
|
|
32
30
|
"level": str(item["severity_text"]),
|
|
33
31
|
"body": str(item["body"]),
|
|
34
32
|
"attributes": {
|
|
@@ -36,6 +34,12 @@ class LogBatcher(Batcher["Log"]):
|
|
|
36
34
|
},
|
|
37
35
|
}
|
|
38
36
|
|
|
37
|
+
if item.get("trace_id") is not None:
|
|
38
|
+
res["trace_id"] = item["trace_id"]
|
|
39
|
+
|
|
40
|
+
if item.get("span_id") is not None:
|
|
41
|
+
res["span_id"] = item["span_id"]
|
|
42
|
+
|
|
39
43
|
return res
|
|
40
44
|
|
|
41
45
|
def _record_lost(self, item: "Log") -> None:
|
|
@@ -21,7 +21,6 @@ class MetricsBatcher(Batcher["Metric"]):
|
|
|
21
21
|
def _to_transport_format(item: "Metric") -> "Any":
|
|
22
22
|
res = {
|
|
23
23
|
"timestamp": item["timestamp"],
|
|
24
|
-
"trace_id": item["trace_id"],
|
|
25
24
|
"name": item["name"],
|
|
26
25
|
"type": item["type"],
|
|
27
26
|
"value": item["value"],
|
|
@@ -30,6 +29,9 @@ class MetricsBatcher(Batcher["Metric"]):
|
|
|
30
29
|
},
|
|
31
30
|
}
|
|
32
31
|
|
|
32
|
+
if item.get("trace_id") is not None:
|
|
33
|
+
res["trace_id"] = item["trace_id"]
|
|
34
|
+
|
|
33
35
|
if item.get("span_id") is not None:
|
|
34
36
|
res["span_id"] = item["span_id"]
|
|
35
37
|
|
|
@@ -13,7 +13,6 @@ if TYPE_CHECKING:
|
|
|
13
13
|
|
|
14
14
|
import sentry_sdk
|
|
15
15
|
from sentry_sdk.traces import StreamedSpan
|
|
16
|
-
from sentry_sdk.tracing_utils import has_span_streaming_enabled
|
|
17
16
|
from sentry_sdk.utils import logger
|
|
18
17
|
|
|
19
18
|
MAX_GEN_AI_MESSAGE_BYTES = 20_000 # 20KB
|
|
@@ -538,13 +537,7 @@ def normalize_message_roles(messages: "list[dict[str, Any]]") -> "list[dict[str,
|
|
|
538
537
|
|
|
539
538
|
|
|
540
539
|
def get_start_span_function() -> "Callable[..., Any]":
|
|
541
|
-
if has_span_streaming_enabled(sentry_sdk.get_client().options):
|
|
542
|
-
return sentry_sdk.traces.start_span
|
|
543
|
-
|
|
544
540
|
current_span = sentry_sdk.get_current_span()
|
|
545
|
-
if isinstance(current_span, StreamedSpan):
|
|
546
|
-
# mypy
|
|
547
|
-
return sentry_sdk.traces.start_span
|
|
548
541
|
|
|
549
542
|
transaction_exists = (
|
|
550
543
|
current_span is not None and current_span.containing_transaction is not None
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import os
|
|
3
|
+
import platform
|
|
3
4
|
import random
|
|
4
5
|
import socket
|
|
6
|
+
import sys
|
|
5
7
|
import uuid
|
|
6
8
|
import warnings
|
|
7
9
|
from collections.abc import Iterable, Mapping
|
|
@@ -241,6 +243,11 @@ def _serialized_v1_span_to_serialized_v2_span(
|
|
|
241
243
|
if "version" in sdk_info:
|
|
242
244
|
attributes["sentry.sdk.version"] = sdk_info["version"]
|
|
243
245
|
|
|
246
|
+
attributes["process.runtime.name"] = platform.python_implementation()
|
|
247
|
+
attributes["process.runtime.version"] = (
|
|
248
|
+
f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
|
|
249
|
+
)
|
|
250
|
+
|
|
244
251
|
if not attributes:
|
|
245
252
|
return res
|
|
246
253
|
|
|
@@ -518,6 +518,12 @@ class SPANDATA:
|
|
|
518
518
|
Example: postgresql
|
|
519
519
|
"""
|
|
520
520
|
|
|
521
|
+
DB_QUERY_TEXT = "db.query.text"
|
|
522
|
+
"""
|
|
523
|
+
The database query being executed.
|
|
524
|
+
Example: "SELECT * FROM users WHERE id = $1"
|
|
525
|
+
"""
|
|
526
|
+
|
|
521
527
|
DB_SYSTEM_NAME = "db.system.name"
|
|
522
528
|
"""
|
|
523
529
|
An identifier for the database management system (DBMS) product being used. See OpenTelemetry's list of well-known DBMS identifiers.
|
|
@@ -825,6 +831,12 @@ class SPANDATA:
|
|
|
825
831
|
Example: GET
|
|
826
832
|
"""
|
|
827
833
|
|
|
834
|
+
HTTP_REQUEST_BODY_DATA = "http.request.body.data"
|
|
835
|
+
"""
|
|
836
|
+
HTTP request body data. Can be given as string or structural data of any format.
|
|
837
|
+
Example: "[{\"role\": \"user\", \"message\": \"hello\"}]"
|
|
838
|
+
"""
|
|
839
|
+
|
|
828
840
|
HTTP_REQUEST_HEADER = "http.request.header"
|
|
829
841
|
"""
|
|
830
842
|
Prefix for HTTP request header attributes. The header name (lowercased) is
|
|
@@ -838,12 +850,6 @@ class SPANDATA:
|
|
|
838
850
|
Example: GET
|
|
839
851
|
"""
|
|
840
852
|
|
|
841
|
-
HTTP_REQUEST_BODY_DATA = "http.request.body.data"
|
|
842
|
-
"""
|
|
843
|
-
The HTTP request body data as string.
|
|
844
|
-
Example: "[{\"role\": \"user\", \"message\": \"hello\"}]"
|
|
845
|
-
"""
|
|
846
|
-
|
|
847
853
|
HTTP_QUERY = "http.query"
|
|
848
854
|
"""
|
|
849
855
|
The Query string present in the URL.
|
|
@@ -978,12 +984,30 @@ class SPANDATA:
|
|
|
978
984
|
Example: "MainThread"
|
|
979
985
|
"""
|
|
980
986
|
|
|
987
|
+
USER_EMAIL = "user.email"
|
|
988
|
+
"""
|
|
989
|
+
User email address.
|
|
990
|
+
Example: "test@example.com"
|
|
991
|
+
"""
|
|
992
|
+
|
|
993
|
+
USER_ID = "user.id"
|
|
994
|
+
"""
|
|
995
|
+
Unique identifier of the user.
|
|
996
|
+
Example: "S-1-5-21-202424912787-2692429404-2351956786-1000"
|
|
997
|
+
"""
|
|
998
|
+
|
|
981
999
|
USER_IP_ADDRESS = "user.ip_address"
|
|
982
1000
|
"""
|
|
983
1001
|
The IP address of the user that triggered the request.
|
|
984
1002
|
Example: "10.1.2.80"
|
|
985
1003
|
"""
|
|
986
1004
|
|
|
1005
|
+
USER_NAME = "user.name"
|
|
1006
|
+
"""
|
|
1007
|
+
Short name or login/username of the user.
|
|
1008
|
+
Example: "j.smith"
|
|
1009
|
+
"""
|
|
1010
|
+
|
|
987
1011
|
URL_FULL = "url.full"
|
|
988
1012
|
"""
|
|
989
1013
|
The URL of the resource that was fetched.
|
|
@@ -996,6 +1020,12 @@ class SPANDATA:
|
|
|
996
1020
|
Example: "details"
|
|
997
1021
|
"""
|
|
998
1022
|
|
|
1023
|
+
URL_PATH = "url.path"
|
|
1024
|
+
"""
|
|
1025
|
+
The URI path component.
|
|
1026
|
+
Example: "/foo"
|
|
1027
|
+
"""
|
|
1028
|
+
|
|
999
1029
|
URL_QUERY = "url.query"
|
|
1000
1030
|
"""
|
|
1001
1031
|
The query string present in the URL. Note that this does not contain the leading ? character, while the `http.query` attribute does.
|
|
@@ -1162,6 +1192,8 @@ class OP:
|
|
|
1162
1192
|
COHERE_CHAT_COMPLETIONS_CREATE = "ai.chat_completions.create.cohere"
|
|
1163
1193
|
COHERE_EMBEDDINGS_CREATE = "ai.embeddings.create.cohere"
|
|
1164
1194
|
DB = "db"
|
|
1195
|
+
DB_CURSOR_ITERATOR = "db.cursor.iter"
|
|
1196
|
+
DB_CURSOR_FETCH = "db.cursor.fetch"
|
|
1165
1197
|
DB_REDIS = "db.redis"
|
|
1166
1198
|
EVENT_DJANGO = "event.django"
|
|
1167
1199
|
FUNCTION = "function"
|
|
@@ -1302,7 +1334,7 @@ class ClientConstructor:
|
|
|
1302
1334
|
before_send_metric: "Optional[Callable[[Metric, Hint], Optional[Metric]]]" = None,
|
|
1303
1335
|
org_id: "Optional[str]" = None,
|
|
1304
1336
|
strict_trace_continuation: bool = False,
|
|
1305
|
-
stream_gen_ai_spans: bool =
|
|
1337
|
+
stream_gen_ai_spans: bool = True,
|
|
1306
1338
|
) -> None:
|
|
1307
1339
|
"""Initialize the Sentry SDK with the given parameters. All parameters described here can be used in a call to `sentry_sdk.init()`.
|
|
1308
1340
|
|
|
@@ -1747,4 +1779,4 @@ DEFAULT_OPTIONS = _get_default_options()
|
|
|
1747
1779
|
del _get_default_options
|
|
1748
1780
|
|
|
1749
1781
|
|
|
1750
|
-
VERSION = "2.
|
|
1782
|
+
VERSION = "2.64.0"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import urllib
|
|
2
|
+
from enum import Enum
|
|
2
3
|
from typing import TYPE_CHECKING
|
|
3
4
|
|
|
4
5
|
from sentry_sdk.integrations._wsgi_common import _filter_headers
|
|
@@ -12,6 +13,11 @@ if TYPE_CHECKING:
|
|
|
12
13
|
from sentry_sdk.utils import AnnotatedValue
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
class _RootPathInPath(Enum):
|
|
17
|
+
EXCLUDED = "excluded"
|
|
18
|
+
EITHER = "either"
|
|
19
|
+
|
|
20
|
+
|
|
15
21
|
def _get_headers(asgi_scope: "Any") -> "Dict[str, str]":
|
|
16
22
|
"""
|
|
17
23
|
Extract headers from the ASGI scope, in the format that the Sentry protocol expects.
|
|
@@ -28,10 +34,27 @@ def _get_headers(asgi_scope: "Any") -> "Dict[str, str]":
|
|
|
28
34
|
return headers
|
|
29
35
|
|
|
30
36
|
|
|
37
|
+
def _get_path(
|
|
38
|
+
asgi_scope: "Dict[str, Any]", root_path_in_path: "_RootPathInPath"
|
|
39
|
+
) -> "str":
|
|
40
|
+
if root_path_in_path is _RootPathInPath.EXCLUDED:
|
|
41
|
+
return asgi_scope.get("root_path", "") + asgi_scope.get("path", "")
|
|
42
|
+
|
|
43
|
+
# Inverse of https://github.com/Kludex/starlette/blob/de970d7b3facb853eb7ad077decbf3d94f2aab6c/starlette/_utils.py#L96
|
|
44
|
+
path = asgi_scope["path"]
|
|
45
|
+
root_path = asgi_scope.get("root_path", "")
|
|
46
|
+
|
|
47
|
+
if not root_path or path == root_path or path.startswith(root_path + "/"):
|
|
48
|
+
return path
|
|
49
|
+
|
|
50
|
+
return root_path + path
|
|
51
|
+
|
|
52
|
+
|
|
31
53
|
def _get_url(
|
|
32
54
|
asgi_scope: "Dict[str, Any]",
|
|
33
55
|
default_scheme: "Literal['ws', 'http']",
|
|
34
56
|
host: "Optional[Union[AnnotatedValue, str]]",
|
|
57
|
+
path: str,
|
|
35
58
|
) -> str:
|
|
36
59
|
"""
|
|
37
60
|
Extract URL from the ASGI scope, without also including the querystring.
|
|
@@ -39,7 +62,6 @@ def _get_url(
|
|
|
39
62
|
scheme = asgi_scope.get("scheme", default_scheme)
|
|
40
63
|
|
|
41
64
|
server = asgi_scope.get("server", None)
|
|
42
|
-
path = asgi_scope.get("root_path", "") + asgi_scope.get("path", "")
|
|
43
65
|
|
|
44
66
|
if host:
|
|
45
67
|
return "%s://%s%s" % (scheme, host, path)
|
|
@@ -81,7 +103,10 @@ def _get_ip(asgi_scope: "Any") -> str:
|
|
|
81
103
|
return asgi_scope.get("client")[0]
|
|
82
104
|
|
|
83
105
|
|
|
84
|
-
def _get_request_data(
|
|
106
|
+
def _get_request_data(
|
|
107
|
+
asgi_scope: "Any",
|
|
108
|
+
root_path_in_path: "_RootPathInPath",
|
|
109
|
+
) -> "Dict[str, Any]":
|
|
85
110
|
"""
|
|
86
111
|
Returns data related to the HTTP request from the ASGI scope.
|
|
87
112
|
"""
|
|
@@ -96,7 +121,10 @@ def _get_request_data(asgi_scope: "Any") -> "Dict[str, Any]":
|
|
|
96
121
|
request_data["query_string"] = _get_query(asgi_scope)
|
|
97
122
|
|
|
98
123
|
request_data["url"] = _get_url(
|
|
99
|
-
asgi_scope,
|
|
124
|
+
asgi_scope,
|
|
125
|
+
"http" if ty == "http" else "ws",
|
|
126
|
+
headers.get("host"),
|
|
127
|
+
path=_get_path(asgi_scope=asgi_scope, root_path_in_path=root_path_in_path),
|
|
100
128
|
)
|
|
101
129
|
|
|
102
130
|
client = asgi_scope.get("client")
|
|
@@ -106,7 +134,10 @@ def _get_request_data(asgi_scope: "Any") -> "Dict[str, Any]":
|
|
|
106
134
|
return request_data
|
|
107
135
|
|
|
108
136
|
|
|
109
|
-
def _get_request_attributes(
|
|
137
|
+
def _get_request_attributes(
|
|
138
|
+
asgi_scope: "Any",
|
|
139
|
+
root_path_in_path: "_RootPathInPath",
|
|
140
|
+
) -> "dict[str, Any]":
|
|
110
141
|
"""
|
|
111
142
|
Return attributes related to the HTTP request from the ASGI scope.
|
|
112
143
|
"""
|
|
@@ -121,13 +152,26 @@ def _get_request_attributes(asgi_scope: "Any") -> "dict[str, Any]":
|
|
|
121
152
|
for header, value in headers.items():
|
|
122
153
|
attributes[f"http.request.header.{header.lower()}"] = value
|
|
123
154
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
155
|
+
if should_send_default_pii():
|
|
156
|
+
query = _get_query(asgi_scope)
|
|
157
|
+
if query:
|
|
158
|
+
attributes["http.query"] = query
|
|
159
|
+
|
|
160
|
+
path = _get_path(asgi_scope=asgi_scope, root_path_in_path=root_path_in_path)
|
|
161
|
+
attributes["url.path"] = path
|
|
162
|
+
|
|
163
|
+
url_without_query_string = _get_url(
|
|
164
|
+
asgi_scope,
|
|
165
|
+
"http" if ty == "http" else "ws",
|
|
166
|
+
headers.get("host"),
|
|
167
|
+
path=path,
|
|
168
|
+
)
|
|
169
|
+
query_string = _get_query(asgi_scope)
|
|
170
|
+
attributes["url.full"] = (
|
|
171
|
+
f"{url_without_query_string}?{query_string}"
|
|
172
|
+
if query_string is not None
|
|
173
|
+
else url_without_query_string
|
|
174
|
+
)
|
|
131
175
|
|
|
132
176
|
client = asgi_scope.get("client")
|
|
133
177
|
if client and should_send_default_pii():
|
|
@@ -159,11 +159,17 @@ class AioHttpIntegration(Integration):
|
|
|
159
159
|
header_value
|
|
160
160
|
)
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
url_attributes = {}
|
|
163
|
+
if should_send_default_pii():
|
|
164
|
+
url_attributes["url.full"] = "%s://%s%s" % (
|
|
165
|
+
request.scheme,
|
|
166
|
+
request.host,
|
|
167
|
+
request.path,
|
|
168
|
+
)
|
|
169
|
+
url_attributes["url.path"] = request.path
|
|
170
|
+
|
|
171
|
+
if request.query_string:
|
|
172
|
+
url_attributes["url.query"] = request.query_string
|
|
167
173
|
|
|
168
174
|
client_address_attributes = {}
|
|
169
175
|
if should_send_default_pii() and request.remote:
|
|
@@ -180,10 +186,8 @@ class AioHttpIntegration(Integration):
|
|
|
180
186
|
"sentry.op": OP.HTTP_SERVER,
|
|
181
187
|
"sentry.origin": AioHttpIntegration.origin,
|
|
182
188
|
"sentry.span.source": SegmentSource.ROUTE.value,
|
|
183
|
-
"url.full": "%s://%s%s"
|
|
184
|
-
% (request.scheme, request.host, request.path),
|
|
185
189
|
"http.request.method": request.method,
|
|
186
|
-
**
|
|
190
|
+
**url_attributes,
|
|
187
191
|
**client_address_attributes,
|
|
188
192
|
**header_attributes,
|
|
189
193
|
},
|
|
@@ -354,8 +358,10 @@ def create_trace_config() -> "TraceConfig":
|
|
|
354
358
|
"sentry.origin": AioHttpIntegration.origin,
|
|
355
359
|
"http.request.method": method,
|
|
356
360
|
}
|
|
357
|
-
if parsed_url is not None:
|
|
361
|
+
if parsed_url is not None and should_send_default_pii():
|
|
358
362
|
attributes["url.full"] = parsed_url.url
|
|
363
|
+
attributes["url.path"] = params.url.path
|
|
364
|
+
|
|
359
365
|
if parsed_url.query:
|
|
360
366
|
attributes["url.query"] = parsed_url.query
|
|
361
367
|
if parsed_url.fragment:
|
|
@@ -16,9 +16,11 @@ from sentry_sdk.consts import OP, SPANDATA
|
|
|
16
16
|
from sentry_sdk.integrations._asgi_common import (
|
|
17
17
|
_get_headers,
|
|
18
18
|
_get_ip,
|
|
19
|
+
_get_path,
|
|
19
20
|
_get_request_attributes,
|
|
20
21
|
_get_request_data,
|
|
21
22
|
_get_url,
|
|
23
|
+
_RootPathInPath,
|
|
22
24
|
)
|
|
23
25
|
from sentry_sdk.integrations._wsgi_common import (
|
|
24
26
|
DEFAULT_HTTP_METHODS_TO_CAPTURE,
|
|
@@ -105,6 +107,7 @@ class SentryAsgiMiddleware:
|
|
|
105
107
|
"mechanism_type",
|
|
106
108
|
"span_origin",
|
|
107
109
|
"http_methods_to_capture",
|
|
110
|
+
"root_path_in_path",
|
|
108
111
|
)
|
|
109
112
|
|
|
110
113
|
def __init__(
|
|
@@ -116,6 +119,7 @@ class SentryAsgiMiddleware:
|
|
|
116
119
|
span_origin: str = "manual",
|
|
117
120
|
http_methods_to_capture: "Tuple[str, ...]" = DEFAULT_HTTP_METHODS_TO_CAPTURE,
|
|
118
121
|
asgi_version: "Optional[int]" = None,
|
|
122
|
+
root_path_in_path: "_RootPathInPath" = _RootPathInPath.EXCLUDED,
|
|
119
123
|
) -> None:
|
|
120
124
|
"""
|
|
121
125
|
Instrument an ASGI application with Sentry. Provides HTTP/websocket
|
|
@@ -152,6 +156,7 @@ class SentryAsgiMiddleware:
|
|
|
152
156
|
self.span_origin = span_origin
|
|
153
157
|
self.app = app
|
|
154
158
|
self.http_methods_to_capture = http_methods_to_capture
|
|
159
|
+
self.root_path_in_path = root_path_in_path
|
|
155
160
|
|
|
156
161
|
if asgi_version is None:
|
|
157
162
|
if _looks_like_asgi3(app):
|
|
@@ -319,7 +324,8 @@ class SentryAsgiMiddleware:
|
|
|
319
324
|
with span_ctx as span:
|
|
320
325
|
if isinstance(span, StreamedSpan):
|
|
321
326
|
for attribute, value in _get_request_attributes(
|
|
322
|
-
scope
|
|
327
|
+
scope,
|
|
328
|
+
root_path_in_path=self.root_path_in_path,
|
|
323
329
|
).items():
|
|
324
330
|
span.set_attribute(attribute, value)
|
|
325
331
|
|
|
@@ -401,7 +407,9 @@ class SentryAsgiMiddleware:
|
|
|
401
407
|
self, event: "Event", hint: "Hint", asgi_scope: "Any"
|
|
402
408
|
) -> "Optional[Event]":
|
|
403
409
|
request_data = event.get("request", {})
|
|
404
|
-
request_data.update(
|
|
410
|
+
request_data.update(
|
|
411
|
+
_get_request_data(asgi_scope, root_path_in_path=self.root_path_in_path)
|
|
412
|
+
)
|
|
405
413
|
event["request"] = deepcopy(request_data)
|
|
406
414
|
|
|
407
415
|
# Only set transaction name if not already set by Starlette or FastAPI (or other frameworks)
|
|
@@ -447,7 +455,14 @@ class SentryAsgiMiddleware:
|
|
|
447
455
|
if endpoint:
|
|
448
456
|
name = transaction_from_function(endpoint) or ""
|
|
449
457
|
else:
|
|
450
|
-
name = _get_url(
|
|
458
|
+
name = _get_url(
|
|
459
|
+
asgi_scope,
|
|
460
|
+
"http" if ty == "http" else "ws",
|
|
461
|
+
host=None,
|
|
462
|
+
path=_get_path(
|
|
463
|
+
asgi_scope=asgi_scope, root_path_in_path=self.root_path_in_path
|
|
464
|
+
),
|
|
465
|
+
)
|
|
451
466
|
source = TransactionSource.URL
|
|
452
467
|
|
|
453
468
|
elif transaction_style == "url":
|
|
@@ -459,7 +474,14 @@ class SentryAsgiMiddleware:
|
|
|
459
474
|
if path is not None:
|
|
460
475
|
name = path
|
|
461
476
|
else:
|
|
462
|
-
name = _get_url(
|
|
477
|
+
name = _get_url(
|
|
478
|
+
asgi_scope,
|
|
479
|
+
"http" if ty == "http" else "ws",
|
|
480
|
+
host=None,
|
|
481
|
+
path=_get_path(
|
|
482
|
+
asgi_scope=asgi_scope, root_path_in_path=self.root_path_in_path
|
|
483
|
+
),
|
|
484
|
+
)
|
|
463
485
|
source = TransactionSource.URL
|
|
464
486
|
|
|
465
487
|
if name is None:
|
|
@@ -484,7 +506,14 @@ class SentryAsgiMiddleware:
|
|
|
484
506
|
if endpoint:
|
|
485
507
|
name = qualname_from_function(endpoint) or ""
|
|
486
508
|
else:
|
|
487
|
-
name = _get_url(
|
|
509
|
+
name = _get_url(
|
|
510
|
+
asgi_scope,
|
|
511
|
+
"http" if ty == "http" else "ws",
|
|
512
|
+
host=None,
|
|
513
|
+
path=_get_path(
|
|
514
|
+
asgi_scope=asgi_scope, root_path_in_path=self.root_path_in_path
|
|
515
|
+
),
|
|
516
|
+
)
|
|
488
517
|
source = SegmentSource.URL.value
|
|
489
518
|
|
|
490
519
|
elif segment_style == "url":
|
|
@@ -496,7 +525,14 @@ class SentryAsgiMiddleware:
|
|
|
496
525
|
if path is not None:
|
|
497
526
|
name = path
|
|
498
527
|
else:
|
|
499
|
-
name = _get_url(
|
|
528
|
+
name = _get_url(
|
|
529
|
+
asgi_scope,
|
|
530
|
+
"http" if ty == "http" else "ws",
|
|
531
|
+
host=None,
|
|
532
|
+
path=_get_path(
|
|
533
|
+
asgi_scope=asgi_scope, root_path_in_path=self.root_path_in_path
|
|
534
|
+
),
|
|
535
|
+
)
|
|
500
536
|
source = SegmentSource.URL.value
|
|
501
537
|
|
|
502
538
|
if name is None:
|
|
@@ -20,8 +20,12 @@ from sentry_sdk.utils import (
|
|
|
20
20
|
)
|
|
21
21
|
|
|
22
22
|
try:
|
|
23
|
-
import asyncpg # type: ignore
|
|
24
|
-
from asyncpg.cursor import
|
|
23
|
+
import asyncpg # type: ignore
|
|
24
|
+
from asyncpg.cursor import ( # type: ignore
|
|
25
|
+
BaseCursor,
|
|
26
|
+
Cursor,
|
|
27
|
+
CursorIterator,
|
|
28
|
+
)
|
|
25
29
|
|
|
26
30
|
except ImportError:
|
|
27
31
|
raise DidNotEnable("asyncpg not installed.")
|
|
@@ -169,6 +173,13 @@ def _wrap_cursor_method(
|
|
|
169
173
|
return await f(*args, **kwargs)
|
|
170
174
|
|
|
171
175
|
cursor = args[0]
|
|
176
|
+
if type(cursor) is CursorIterator:
|
|
177
|
+
span_op_override_value = OP.DB_CURSOR_ITERATOR
|
|
178
|
+
elif type(cursor) is Cursor:
|
|
179
|
+
span_op_override_value = OP.DB_CURSOR_FETCH
|
|
180
|
+
else:
|
|
181
|
+
span_op_override_value = None
|
|
182
|
+
|
|
172
183
|
query = _normalize_query(cursor._query)
|
|
173
184
|
with record_sql_queries(
|
|
174
185
|
cursor=cursor,
|
|
@@ -178,6 +189,7 @@ def _wrap_cursor_method(
|
|
|
178
189
|
executemany=False,
|
|
179
190
|
record_cursor_repr=True,
|
|
180
191
|
span_origin=AsyncPGIntegration.origin,
|
|
192
|
+
span_op_override_value=span_op_override_value,
|
|
181
193
|
) as span:
|
|
182
194
|
_set_db_data(span, cursor._connection)
|
|
183
195
|
res = await f(*args, **kwargs)
|
|
@@ -6,14 +6,21 @@ from copy import deepcopy
|
|
|
6
6
|
from datetime import datetime, timedelta, timezone
|
|
7
7
|
from os import environ
|
|
8
8
|
from typing import TYPE_CHECKING
|
|
9
|
+
from urllib.parse import urlencode
|
|
9
10
|
|
|
10
11
|
import sentry_sdk
|
|
11
12
|
from sentry_sdk.api import continue_trace
|
|
12
13
|
from sentry_sdk.consts import OP
|
|
13
14
|
from sentry_sdk.integrations import Integration
|
|
14
15
|
from sentry_sdk.integrations._wsgi_common import _filter_headers
|
|
15
|
-
from sentry_sdk.
|
|
16
|
+
from sentry_sdk.integrations.cloud_resource_context import (
|
|
17
|
+
CLOUD_PLATFORM,
|
|
18
|
+
CLOUD_PROVIDER,
|
|
19
|
+
)
|
|
20
|
+
from sentry_sdk.scope import Scope, should_send_default_pii
|
|
21
|
+
from sentry_sdk.traces import SegmentSource
|
|
16
22
|
from sentry_sdk.tracing import TransactionSource
|
|
23
|
+
from sentry_sdk.tracing_utils import has_span_streaming_enabled
|
|
17
24
|
from sentry_sdk.utils import (
|
|
18
25
|
AnnotatedValue,
|
|
19
26
|
TimeoutThread,
|
|
@@ -101,6 +108,7 @@ def _wrap_handler(handler: "F") -> "F":
|
|
|
101
108
|
request_data = {}
|
|
102
109
|
|
|
103
110
|
configured_time = aws_context.get_remaining_time_in_millis()
|
|
111
|
+
aws_region = aws_context.invoked_function_arn.split(":")[3]
|
|
104
112
|
|
|
105
113
|
with sentry_sdk.isolation_scope() as scope:
|
|
106
114
|
timeout_thread = None
|
|
@@ -111,9 +119,7 @@ def _wrap_handler(handler: "F") -> "F":
|
|
|
111
119
|
request_data, aws_context, configured_time
|
|
112
120
|
)
|
|
113
121
|
)
|
|
114
|
-
scope.set_tag(
|
|
115
|
-
"aws_region", aws_context.invoked_function_arn.split(":")[3]
|
|
116
|
-
)
|
|
122
|
+
scope.set_tag("aws_region", aws_region)
|
|
117
123
|
if batch_size > 1:
|
|
118
124
|
scope.set_tag("batch_request", True)
|
|
119
125
|
scope.set_tag("batch_size", batch_size)
|
|
@@ -144,20 +150,71 @@ def _wrap_handler(handler: "F") -> "F":
|
|
|
144
150
|
if not isinstance(headers, dict):
|
|
145
151
|
headers = {}
|
|
146
152
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
153
|
+
header_attributes: "dict[str, Any]" = {}
|
|
154
|
+
for header, header_value in _filter_headers(
|
|
155
|
+
headers, use_annotated_value=False
|
|
156
|
+
).items():
|
|
157
|
+
header_attributes[f"http.request.header.{header.lower()}"] = (
|
|
158
|
+
header_value
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
additional_attributes: "dict[str, Any]" = {}
|
|
162
|
+
if "httpMethod" in request_data:
|
|
163
|
+
additional_attributes["http.request.method"] = request_data[
|
|
164
|
+
"httpMethod"
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
if should_send_default_pii() and "queryStringParameters" in request_data:
|
|
168
|
+
qs = request_data["queryStringParameters"]
|
|
169
|
+
if qs:
|
|
170
|
+
additional_attributes["url.query"] = urlencode(qs)
|
|
171
|
+
|
|
172
|
+
sampling_context = {
|
|
173
|
+
"aws_event": aws_event,
|
|
174
|
+
"aws_context": aws_context,
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function_name = aws_context.function_name
|
|
178
|
+
|
|
179
|
+
if has_span_streaming_enabled(client.options):
|
|
180
|
+
sentry_sdk.traces.continue_trace(headers)
|
|
181
|
+
Scope.set_custom_sampling_context(sampling_context)
|
|
182
|
+
span_ctx = sentry_sdk.traces.start_span(
|
|
183
|
+
name=function_name,
|
|
184
|
+
parent_span=None,
|
|
185
|
+
attributes={
|
|
186
|
+
"sentry.op": OP.FUNCTION_AWS,
|
|
187
|
+
"sentry.origin": AwsLambdaIntegration.origin,
|
|
188
|
+
"sentry.span.source": SegmentSource.COMPONENT,
|
|
189
|
+
"cloud.region": aws_region,
|
|
190
|
+
"cloud.resource_id": aws_context.invoked_function_arn,
|
|
191
|
+
"cloud.platform": CLOUD_PLATFORM.AWS_LAMBDA,
|
|
192
|
+
"cloud.provider": CLOUD_PROVIDER.AWS,
|
|
193
|
+
"faas.name": function_name,
|
|
194
|
+
"faas.invocation_id": aws_context.aws_request_id,
|
|
195
|
+
"faas.version": aws_context.function_version,
|
|
196
|
+
"aws.lambda.invoked_arn": aws_context.invoked_function_arn,
|
|
197
|
+
"aws.log.group.names": [aws_context.log_group_name],
|
|
198
|
+
"aws.log.stream.names": [aws_context.log_stream_name],
|
|
199
|
+
"messaging.batch.message_count": batch_size,
|
|
200
|
+
**header_attributes,
|
|
201
|
+
**additional_attributes,
|
|
202
|
+
},
|
|
203
|
+
)
|
|
204
|
+
else:
|
|
205
|
+
transaction = continue_trace(
|
|
206
|
+
headers,
|
|
207
|
+
op=OP.FUNCTION_AWS,
|
|
208
|
+
name=function_name,
|
|
209
|
+
source=TransactionSource.COMPONENT,
|
|
210
|
+
origin=AwsLambdaIntegration.origin,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
span_ctx = sentry_sdk.start_transaction(
|
|
214
|
+
transaction, custom_sampling_context=sampling_context
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
with span_ctx:
|
|
161
218
|
try:
|
|
162
219
|
return handler(aws_event, aws_context, *args, **kwargs)
|
|
163
220
|
except Exception:
|
|
@@ -4,6 +4,7 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
import sentry_sdk
|
|
5
5
|
from sentry_sdk.consts import OP, SPANDATA
|
|
6
6
|
from sentry_sdk.integrations import DidNotEnable, Integration, _check_minimum_version
|
|
7
|
+
from sentry_sdk.scope import should_send_default_pii
|
|
7
8
|
from sentry_sdk.traces import StreamedSpan
|
|
8
9
|
from sentry_sdk.tracing import Span
|
|
9
10
|
from sentry_sdk.tracing_utils import has_span_streaming_enabled
|
|
@@ -74,7 +75,7 @@ def _sentry_request_created(
|
|
|
74
75
|
SPANDATA.RPC_METHOD: f"{service_id}/{operation_name}",
|
|
75
76
|
},
|
|
76
77
|
)
|
|
77
|
-
if request.url is not None:
|
|
78
|
+
if request.url is not None and should_send_default_pii():
|
|
78
79
|
with capture_internal_exceptions():
|
|
79
80
|
parsed_url = parse_url(request.url, sanitize=False)
|
|
80
81
|
span.set_attribute(SPANDATA.URL_FULL, parsed_url.url)
|