sentry-sdk 3.0.0a3__tar.gz → 3.0.0a5__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.
- {sentry_sdk-3.0.0a3/sentry_sdk.egg-info → sentry_sdk-3.0.0a5}/PKG-INFO +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/__init__.py +3 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/ai/monitoring.py +7 -7
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/ai/utils.py +5 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/api.py +73 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/client.py +10 -7
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/consts.py +148 -8
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/aiohttp.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/anthropic.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/arq.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/asyncio.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/asyncpg.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/boto3.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/celery/__init__.py +4 -3
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/clickhouse_driver.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/cohere.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/django/__init__.py +12 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/django/asgi.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/django/caching.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/django/middleware.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/django/signals_handlers.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/django/templates.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/django/views.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/gnu_backtrace.py +3 -14
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/graphene.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/grpc/aio/client.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/grpc/client.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/httpx.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/huey.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/huggingface_hub.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/langchain.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/litestar.py +3 -3
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/logging.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/loguru.py +1 -1
- sentry_sdk-3.0.0a5/sentry_sdk/integrations/openai.py +648 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/utils.py +1 -49
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openfeature.py +4 -5
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/pymongo.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/ray.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/_async_common.py +3 -3
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/_sync_common.py +3 -3
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/rust_tracing.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/socket.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/starlette.py +3 -3
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/starlite.py +4 -4
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/stdlib.py +4 -4
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/strawberry.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/threading.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/scope.py +13 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/span_processor.py +1 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/serializer.py +8 -11
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/tracing.py +9 -4
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/tracing_utils.py +3 -3
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/utils.py +46 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5/sentry_sdk.egg-info}/PKG-INFO +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/setup.py +1 -1
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_api.py +39 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_basics.py +2 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_client.py +16 -22
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_logs.py +19 -21
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_serializer.py +3 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_tracing_utils.py +4 -4
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_transport.py +1 -2
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_utils.py +1 -2
- sentry_sdk-3.0.0a3/sentry_sdk/integrations/openai.py +0 -443
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/LICENSE +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/MANIFEST.in +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/README.md +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/pyproject.toml +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/_compat.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/_init_implementation.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/_log_batcher.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/_lru_cache.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/_queue.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/_types.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/_werkzeug.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/ai/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/attachments.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/crons/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/crons/api.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/crons/consts.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/crons/decorator.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/debug.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/envelope.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/feature_flags.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/_asgi_common.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/_wsgi_common.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/argv.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/ariadne.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/asgi.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/atexit.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/aws_lambda.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/beam.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/bottle.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/celery/beat.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/celery/utils.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/chalice.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/cloud_resource_context.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/dedupe.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/django/transactions.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/dramatiq.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/excepthook.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/executing.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/falcon.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/fastapi.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/flask.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/gcp.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/gql.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/grpc/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/grpc/aio/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/grpc/aio/server.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/grpc/consts.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/grpc/server.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/launchdarkly.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/modules.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/consts.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/patches/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/patches/agent_run.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/patches/models.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/patches/runner.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/patches/tools.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/spans/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/spans/agent_workflow.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/spans/ai_client.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/spans/execute_tool.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/spans/handoff.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/openai_agents/spans/invoke_agent.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/pure_eval.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/pyramid.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/quart.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/consts.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/modules/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/modules/caches.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/modules/queries.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/rb.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/redis.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/redis_cluster.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/redis_py_cluster_legacy.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/redis/utils.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/rq.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/sanic.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/serverless.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/spark/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/spark/spark_driver.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/spark/spark_worker.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/sqlalchemy.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/statsig.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/sys_exit.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/tornado.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/trytond.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/typer.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/unleash.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/integrations/wsgi.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/logger.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/monitor.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/consts.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/contextvars_context.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/propagator.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/sampler.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/tracing.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/opentelemetry/utils.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/profiler/__init__.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/profiler/continuous_profiler.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/profiler/transaction_profiler.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/profiler/utils.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/py.typed +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/scope.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/scrubber.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/session.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/sessions.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/spotlight.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/transport.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/types.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk/worker.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk.egg-info/SOURCES.txt +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk.egg-info/dependency_links.txt +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk.egg-info/entry_points.txt +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk.egg-info/not-zip-safe +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk.egg-info/requires.txt +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/sentry_sdk.egg-info/top_level.txt +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/setup.cfg +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_ai_monitoring.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_breadcrumbs.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_conftest.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_crons.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_dsc.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_envelope.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_exceptiongroup.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_feature_flags.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_full_stack_frames.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_gevent.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_import.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_lru_cache.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_monitor.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_propagationcontext.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_scope.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_scrubber.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_sessions.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_spotlight.py +0 -0
- {sentry_sdk-3.0.0a3 → sentry_sdk-3.0.0a5}/tests/test_types.py +0 -0
|
@@ -22,6 +22,7 @@ __all__ = [ # noqa
|
|
|
22
22
|
"capture_exception",
|
|
23
23
|
"capture_message",
|
|
24
24
|
"continue_trace",
|
|
25
|
+
"new_trace",
|
|
25
26
|
"flush",
|
|
26
27
|
"get_baggage",
|
|
27
28
|
"get_client",
|
|
@@ -47,6 +48,8 @@ __all__ = [ # noqa
|
|
|
47
48
|
"logger",
|
|
48
49
|
"start_session",
|
|
49
50
|
"end_session",
|
|
51
|
+
"set_transaction_name",
|
|
52
|
+
"update_current_span",
|
|
50
53
|
]
|
|
51
54
|
|
|
52
55
|
# Initialize the debug support after everything is loaded
|
|
@@ -31,14 +31,14 @@ def ai_track(description: str, **span_kwargs: Any) -> Callable[..., Any]:
|
|
|
31
31
|
op = span_kwargs.pop("op", "ai.run" if curr_pipeline else "ai.pipeline")
|
|
32
32
|
|
|
33
33
|
with start_span(
|
|
34
|
-
name=description, op=op,
|
|
34
|
+
name=description, op=op, only_as_child_span=True, **span_kwargs
|
|
35
35
|
) as span:
|
|
36
36
|
for k, v in kwargs.pop("sentry_tags", {}).items():
|
|
37
37
|
span.set_tag(k, v)
|
|
38
38
|
for k, v in kwargs.pop("sentry_data", {}).items():
|
|
39
39
|
span.set_attribute(k, v)
|
|
40
40
|
if curr_pipeline:
|
|
41
|
-
span.set_attribute(SPANDATA.
|
|
41
|
+
span.set_attribute(SPANDATA.GEN_AI_PIPELINE_NAME, curr_pipeline)
|
|
42
42
|
return f(*args, **kwargs)
|
|
43
43
|
else:
|
|
44
44
|
_ai_pipeline_name.set(description)
|
|
@@ -61,14 +61,14 @@ def ai_track(description: str, **span_kwargs: Any) -> Callable[..., Any]:
|
|
|
61
61
|
op = span_kwargs.pop("op", "ai.run" if curr_pipeline else "ai.pipeline")
|
|
62
62
|
|
|
63
63
|
with start_span(
|
|
64
|
-
name=description, op=op,
|
|
64
|
+
name=description, op=op, only_as_child_span=True, **span_kwargs
|
|
65
65
|
) as span:
|
|
66
66
|
for k, v in kwargs.pop("sentry_tags", {}).items():
|
|
67
67
|
span.set_tag(k, v)
|
|
68
68
|
for k, v in kwargs.pop("sentry_data", {}).items():
|
|
69
69
|
span.set_attribute(k, v)
|
|
70
70
|
if curr_pipeline:
|
|
71
|
-
span.set_attribute(SPANDATA.
|
|
71
|
+
span.set_attribute(SPANDATA.GEN_AI_PIPELINE_NAME, curr_pipeline)
|
|
72
72
|
return await f(*args, **kwargs)
|
|
73
73
|
else:
|
|
74
74
|
_ai_pipeline_name.set(description)
|
|
@@ -105,7 +105,7 @@ def record_token_usage(
|
|
|
105
105
|
# TODO: move pipeline name elsewhere
|
|
106
106
|
ai_pipeline_name = get_ai_pipeline_name()
|
|
107
107
|
if ai_pipeline_name:
|
|
108
|
-
span.set_attribute(SPANDATA.
|
|
108
|
+
span.set_attribute(SPANDATA.GEN_AI_PIPELINE_NAME, ai_pipeline_name)
|
|
109
109
|
|
|
110
110
|
if input_tokens is not None:
|
|
111
111
|
span.set_attribute(SPANDATA.GEN_AI_USAGE_INPUT_TOKENS, input_tokens)
|
|
@@ -117,10 +117,10 @@ def record_token_usage(
|
|
|
117
117
|
)
|
|
118
118
|
|
|
119
119
|
if output_tokens is not None:
|
|
120
|
-
span.
|
|
120
|
+
span.set_attribute(SPANDATA.GEN_AI_USAGE_OUTPUT_TOKENS, output_tokens)
|
|
121
121
|
|
|
122
122
|
if output_tokens_reasoning is not None:
|
|
123
|
-
span.
|
|
123
|
+
span.set_attribute(
|
|
124
124
|
SPANDATA.GEN_AI_USAGE_OUTPUT_TOKENS_REASONING,
|
|
125
125
|
output_tokens_reasoning,
|
|
126
126
|
)
|
|
@@ -23,9 +23,13 @@ def _normalize_data(data: Any) -> Any:
|
|
|
23
23
|
return list(_normalize_data(x) for x in data)
|
|
24
24
|
if isinstance(data, dict):
|
|
25
25
|
return {k: _normalize_data(v) for (k, v) in data.items()}
|
|
26
|
+
|
|
26
27
|
return data
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
def set_data_normalized(span: Span, key: str, value: Any) -> None:
|
|
30
31
|
normalized = _normalize_data(value)
|
|
31
|
-
|
|
32
|
+
if isinstance(normalized, (int, float, bool, str)):
|
|
33
|
+
span.set_attribute(key, normalized)
|
|
34
|
+
else:
|
|
35
|
+
span.set_attribute(key, str(normalized))
|
|
@@ -48,6 +48,7 @@ __all__ = [
|
|
|
48
48
|
"capture_exception",
|
|
49
49
|
"capture_message",
|
|
50
50
|
"continue_trace",
|
|
51
|
+
"new_trace",
|
|
51
52
|
"flush",
|
|
52
53
|
"get_baggage",
|
|
53
54
|
"get_client",
|
|
@@ -74,6 +75,8 @@ __all__ = [
|
|
|
74
75
|
"use_isolation_scope",
|
|
75
76
|
"start_session",
|
|
76
77
|
"end_session",
|
|
78
|
+
"set_transaction_name",
|
|
79
|
+
"update_current_span",
|
|
77
80
|
]
|
|
78
81
|
|
|
79
82
|
|
|
@@ -315,6 +318,15 @@ def continue_trace(environ_or_headers: dict[str, Any]) -> Generator[None, None,
|
|
|
315
318
|
yield
|
|
316
319
|
|
|
317
320
|
|
|
321
|
+
@contextmanager
|
|
322
|
+
def new_trace() -> Generator[None, None, None]:
|
|
323
|
+
"""
|
|
324
|
+
Force creation of a new trace.
|
|
325
|
+
"""
|
|
326
|
+
with get_isolation_scope().new_trace():
|
|
327
|
+
yield
|
|
328
|
+
|
|
329
|
+
|
|
318
330
|
@scopemethod
|
|
319
331
|
def start_session(
|
|
320
332
|
session_mode: str = "application",
|
|
@@ -325,3 +337,64 @@ def start_session(
|
|
|
325
337
|
@scopemethod
|
|
326
338
|
def end_session() -> None:
|
|
327
339
|
return get_isolation_scope().end_session()
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
@scopemethod
|
|
343
|
+
def set_transaction_name(name: str, source: Optional[str] = None) -> None:
|
|
344
|
+
return get_current_scope().set_transaction_name(name, source)
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
def update_current_span(op=None, name=None, attributes=None):
|
|
348
|
+
# type: (Optional[str], Optional[str], Optional[dict[str, Union[str, int, float, bool]]]) -> None
|
|
349
|
+
"""
|
|
350
|
+
Update the current active span with the provided parameters.
|
|
351
|
+
|
|
352
|
+
This function allows you to modify properties of the currently active span.
|
|
353
|
+
If no span is currently active, this function will do nothing.
|
|
354
|
+
|
|
355
|
+
:param op: The operation name for the span. This is a high-level description
|
|
356
|
+
of what the span represents (e.g., "http.client", "db.query").
|
|
357
|
+
You can use predefined constants from :py:class:`sentry_sdk.consts.OP`
|
|
358
|
+
or provide your own string. If not provided, the span's operation will
|
|
359
|
+
remain unchanged.
|
|
360
|
+
:type op: str or None
|
|
361
|
+
|
|
362
|
+
:param name: The human-readable name/description for the span. This provides
|
|
363
|
+
more specific details about what the span represents (e.g., "GET /api/users",
|
|
364
|
+
"SELECT * FROM users"). If not provided, the span's name will remain unchanged.
|
|
365
|
+
:type name: str or None
|
|
366
|
+
|
|
367
|
+
:param attributes: A dictionary of key-value pairs to add as attributes to the span.
|
|
368
|
+
Attribute values must be strings, integers, floats, or booleans. These
|
|
369
|
+
attributes will be merged with any existing span data. If not provided,
|
|
370
|
+
no attributes will be added.
|
|
371
|
+
:type attributes: dict[str, Union[str, int, float, bool]] or None
|
|
372
|
+
|
|
373
|
+
:returns: None
|
|
374
|
+
|
|
375
|
+
.. versionadded:: 2.35.0
|
|
376
|
+
|
|
377
|
+
Example::
|
|
378
|
+
|
|
379
|
+
import sentry_sdk
|
|
380
|
+
from sentry_sdk.consts import OP
|
|
381
|
+
|
|
382
|
+
sentry_sdk.update_current_span(
|
|
383
|
+
op=OP.FUNCTION,
|
|
384
|
+
name="process_user_data",
|
|
385
|
+
attributes={"user_id": 123, "batch_size": 50}
|
|
386
|
+
)
|
|
387
|
+
"""
|
|
388
|
+
current_span = get_current_span()
|
|
389
|
+
|
|
390
|
+
if current_span is None:
|
|
391
|
+
return
|
|
392
|
+
|
|
393
|
+
if op is not None:
|
|
394
|
+
current_span.op = op
|
|
395
|
+
|
|
396
|
+
if name is not None:
|
|
397
|
+
current_span.name = name
|
|
398
|
+
|
|
399
|
+
if attributes is not None:
|
|
400
|
+
current_span.set_attributes(attributes)
|
|
@@ -46,7 +46,6 @@ from sentry_sdk.profiler.transaction_profiler import (
|
|
|
46
46
|
)
|
|
47
47
|
from sentry_sdk.scrubber import EventScrubber
|
|
48
48
|
from sentry_sdk.monitor import Monitor
|
|
49
|
-
from sentry_sdk.spotlight import setup_spotlight
|
|
50
49
|
|
|
51
50
|
if TYPE_CHECKING:
|
|
52
51
|
from typing import (
|
|
@@ -323,9 +322,9 @@ class _Client(BaseClient):
|
|
|
323
322
|
|
|
324
323
|
self.session_flusher = SessionFlusher(capture_func=_capture_envelope)
|
|
325
324
|
|
|
326
|
-
experiments = self.options.get("_experiments", {})
|
|
327
325
|
self.log_batcher = None
|
|
328
|
-
|
|
326
|
+
|
|
327
|
+
if self.options.get("enable_logs") is True:
|
|
329
328
|
from sentry_sdk._log_batcher import LogBatcher
|
|
330
329
|
|
|
331
330
|
self.log_batcher = LogBatcher(capture_func=_capture_envelope)
|
|
@@ -358,6 +357,10 @@ class _Client(BaseClient):
|
|
|
358
357
|
)
|
|
359
358
|
|
|
360
359
|
if self.options.get("spotlight"):
|
|
360
|
+
# This is intentionally here to prevent setting up spotlight
|
|
361
|
+
# stuff we don't need unless spotlight is explicitly enabled
|
|
362
|
+
from sentry_sdk.spotlight import setup_spotlight
|
|
363
|
+
|
|
361
364
|
self.spotlight = setup_spotlight(self.options)
|
|
362
365
|
if not self.options["dsn"]:
|
|
363
366
|
sample_all = lambda *_args, **_kwargs: 1.0
|
|
@@ -817,9 +820,8 @@ class _Client(BaseClient):
|
|
|
817
820
|
|
|
818
821
|
return return_value
|
|
819
822
|
|
|
820
|
-
def _capture_experimental_log(self, log: Log) -> None:
|
|
821
|
-
|
|
822
|
-
if not logs_enabled:
|
|
823
|
+
def _capture_experimental_log(self, log: Optional[Log]) -> None:
|
|
824
|
+
if self.options.get("enable_logs") is not True or log is None:
|
|
823
825
|
return
|
|
824
826
|
|
|
825
827
|
current_scope = sentry_sdk.get_current_scope()
|
|
@@ -874,9 +876,10 @@ class _Client(BaseClient):
|
|
|
874
876
|
f'[Sentry Logs] [{log.get("severity_text")}] {log.get("body")}'
|
|
875
877
|
)
|
|
876
878
|
|
|
877
|
-
before_send_log = self.options
|
|
879
|
+
before_send_log = self.options.get("before_send_log")
|
|
878
880
|
if before_send_log is not None:
|
|
879
881
|
log = before_send_log(log, {})
|
|
882
|
+
|
|
880
883
|
if log is None:
|
|
881
884
|
return
|
|
882
885
|
|
|
@@ -17,7 +17,10 @@ if TYPE_CHECKING:
|
|
|
17
17
|
)
|
|
18
18
|
|
|
19
19
|
# up top to prevent circular import due to integration import
|
|
20
|
-
|
|
20
|
+
# This is more or less an arbitrary large-ish value for now, so that we allow
|
|
21
|
+
# pretty long strings (like LLM prompts), but still have *some* upper limit
|
|
22
|
+
# until we verify that removing the trimming completely is safe.
|
|
23
|
+
DEFAULT_MAX_VALUE_LENGTH = 100_000
|
|
21
24
|
|
|
22
25
|
DEFAULT_MAX_STACK_FRAMES = 100
|
|
23
26
|
DEFAULT_ADD_FULL_STACK = False
|
|
@@ -75,8 +78,6 @@ if TYPE_CHECKING:
|
|
|
75
78
|
"transport_compression_algo": Optional[CompressionAlgo],
|
|
76
79
|
"transport_num_pools": Optional[int],
|
|
77
80
|
"transport_http2": Optional[bool],
|
|
78
|
-
"enable_logs": Optional[bool],
|
|
79
|
-
"before_send_log": Optional[Callable[[Log, Hint], Optional[Log]]],
|
|
80
81
|
},
|
|
81
82
|
total=False,
|
|
82
83
|
)
|
|
@@ -102,6 +103,9 @@ class SPANDATA:
|
|
|
102
103
|
|
|
103
104
|
AI_CITATIONS = "ai.citations"
|
|
104
105
|
"""
|
|
106
|
+
.. deprecated::
|
|
107
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
108
|
+
|
|
105
109
|
References or sources cited by the AI model in its response.
|
|
106
110
|
Example: ["Smith et al. 2020", "Jones 2019"]
|
|
107
111
|
"""
|
|
@@ -114,64 +118,97 @@ class SPANDATA:
|
|
|
114
118
|
|
|
115
119
|
AI_DOCUMENTS = "ai.documents"
|
|
116
120
|
"""
|
|
121
|
+
.. deprecated::
|
|
122
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
123
|
+
|
|
117
124
|
Documents or content chunks used as context for the AI model.
|
|
118
125
|
Example: ["doc1.txt", "doc2.pdf"]
|
|
119
126
|
"""
|
|
120
127
|
|
|
121
128
|
AI_FINISH_REASON = "ai.finish_reason"
|
|
122
129
|
"""
|
|
130
|
+
.. deprecated::
|
|
131
|
+
This attribute is deprecated. Use GEN_AI_RESPONSE_FINISH_REASONS instead.
|
|
132
|
+
|
|
123
133
|
The reason why the model stopped generating.
|
|
124
134
|
Example: "length"
|
|
125
135
|
"""
|
|
126
136
|
|
|
127
137
|
AI_FREQUENCY_PENALTY = "ai.frequency_penalty"
|
|
128
138
|
"""
|
|
139
|
+
.. deprecated::
|
|
140
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_FREQUENCY_PENALTY instead.
|
|
141
|
+
|
|
129
142
|
Used to reduce repetitiveness of generated tokens.
|
|
130
143
|
Example: 0.5
|
|
131
144
|
"""
|
|
132
145
|
|
|
133
146
|
AI_FUNCTION_CALL = "ai.function_call"
|
|
134
147
|
"""
|
|
148
|
+
.. deprecated::
|
|
149
|
+
This attribute is deprecated. Use GEN_AI_RESPONSE_TOOL_CALLS instead.
|
|
150
|
+
|
|
135
151
|
For an AI model call, the function that was called. This is deprecated for OpenAI, and replaced by tool_calls
|
|
136
152
|
"""
|
|
137
153
|
|
|
138
154
|
AI_GENERATION_ID = "ai.generation_id"
|
|
139
155
|
"""
|
|
156
|
+
.. deprecated::
|
|
157
|
+
This attribute is deprecated. Use GEN_AI_RESPONSE_ID instead.
|
|
158
|
+
|
|
140
159
|
Unique identifier for the completion.
|
|
141
160
|
Example: "gen_123abc"
|
|
142
161
|
"""
|
|
143
162
|
|
|
144
163
|
AI_INPUT_MESSAGES = "ai.input_messages"
|
|
145
164
|
"""
|
|
165
|
+
.. deprecated::
|
|
166
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_MESSAGES instead.
|
|
167
|
+
|
|
146
168
|
The input messages to an LLM call.
|
|
147
169
|
Example: [{"role": "user", "message": "hello"}]
|
|
148
170
|
"""
|
|
149
171
|
|
|
150
172
|
AI_LOGIT_BIAS = "ai.logit_bias"
|
|
151
173
|
"""
|
|
174
|
+
.. deprecated::
|
|
175
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
176
|
+
|
|
152
177
|
For an AI model call, the logit bias
|
|
153
178
|
"""
|
|
154
179
|
|
|
155
180
|
AI_METADATA = "ai.metadata"
|
|
156
181
|
"""
|
|
182
|
+
.. deprecated::
|
|
183
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
184
|
+
|
|
157
185
|
Extra metadata passed to an AI pipeline step.
|
|
158
186
|
Example: {"executed_function": "add_integers"}
|
|
159
187
|
"""
|
|
160
188
|
|
|
161
189
|
AI_MODEL_ID = "ai.model_id"
|
|
162
190
|
"""
|
|
163
|
-
|
|
191
|
+
.. deprecated::
|
|
192
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_MODEL or GEN_AI_RESPONSE_MODEL instead.
|
|
193
|
+
|
|
194
|
+
The unique descriptor of the model being executed.
|
|
164
195
|
Example: gpt-4
|
|
165
196
|
"""
|
|
166
197
|
|
|
167
198
|
AI_PIPELINE_NAME = "ai.pipeline.name"
|
|
168
199
|
"""
|
|
200
|
+
.. deprecated::
|
|
201
|
+
This attribute is deprecated. Use GEN_AI_PIPELINE_NAME instead.
|
|
202
|
+
|
|
169
203
|
Name of the AI pipeline or chain being executed.
|
|
170
204
|
Example: "qa-pipeline"
|
|
171
205
|
"""
|
|
172
206
|
|
|
173
207
|
AI_PREAMBLE = "ai.preamble"
|
|
174
208
|
"""
|
|
209
|
+
.. deprecated::
|
|
210
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
211
|
+
|
|
175
212
|
For an AI model call, the preamble parameter.
|
|
176
213
|
Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style.
|
|
177
214
|
Example: "You are now a clown."
|
|
@@ -179,6 +216,9 @@ class SPANDATA:
|
|
|
179
216
|
|
|
180
217
|
AI_PRESENCE_PENALTY = "ai.presence_penalty"
|
|
181
218
|
"""
|
|
219
|
+
.. deprecated::
|
|
220
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_PRESENCE_PENALTY instead.
|
|
221
|
+
|
|
182
222
|
Used to reduce repetitiveness of generated tokens.
|
|
183
223
|
Example: 0.5
|
|
184
224
|
"""
|
|
@@ -191,88 +231,133 @@ class SPANDATA:
|
|
|
191
231
|
|
|
192
232
|
AI_RAW_PROMPTING = "ai.raw_prompting"
|
|
193
233
|
"""
|
|
234
|
+
.. deprecated::
|
|
235
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
236
|
+
|
|
194
237
|
Minimize pre-processing done to the prompt sent to the LLM.
|
|
195
238
|
Example: true
|
|
196
239
|
"""
|
|
197
240
|
|
|
198
241
|
AI_RESPONSE_FORMAT = "ai.response_format"
|
|
199
242
|
"""
|
|
243
|
+
.. deprecated::
|
|
244
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
245
|
+
|
|
200
246
|
For an AI model call, the format of the response
|
|
201
247
|
"""
|
|
202
248
|
|
|
203
249
|
AI_RESPONSES = "ai.responses"
|
|
204
250
|
"""
|
|
251
|
+
.. deprecated::
|
|
252
|
+
This attribute is deprecated. Use GEN_AI_RESPONSE_TEXT instead.
|
|
253
|
+
|
|
205
254
|
The responses to an AI model call. Always as a list.
|
|
206
255
|
Example: ["hello", "world"]
|
|
207
256
|
"""
|
|
208
257
|
|
|
209
258
|
AI_SEARCH_QUERIES = "ai.search_queries"
|
|
210
259
|
"""
|
|
260
|
+
.. deprecated::
|
|
261
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
262
|
+
|
|
211
263
|
Queries used to search for relevant context or documents.
|
|
212
264
|
Example: ["climate change effects", "renewable energy"]
|
|
213
265
|
"""
|
|
214
266
|
|
|
215
267
|
AI_SEARCH_REQUIRED = "ai.is_search_required"
|
|
216
268
|
"""
|
|
269
|
+
.. deprecated::
|
|
270
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
271
|
+
|
|
217
272
|
Boolean indicating if the model needs to perform a search.
|
|
218
273
|
Example: true
|
|
219
274
|
"""
|
|
220
275
|
|
|
221
276
|
AI_SEARCH_RESULTS = "ai.search_results"
|
|
222
277
|
"""
|
|
278
|
+
.. deprecated::
|
|
279
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
280
|
+
|
|
223
281
|
Results returned from search queries for context.
|
|
224
282
|
Example: ["Result 1", "Result 2"]
|
|
225
283
|
"""
|
|
226
284
|
|
|
227
285
|
AI_SEED = "ai.seed"
|
|
228
286
|
"""
|
|
287
|
+
.. deprecated::
|
|
288
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_SEED instead.
|
|
289
|
+
|
|
229
290
|
The seed, ideally models given the same seed and same other parameters will produce the exact same output.
|
|
230
291
|
Example: 123.45
|
|
231
292
|
"""
|
|
232
293
|
|
|
233
294
|
AI_STREAMING = "ai.streaming"
|
|
234
295
|
"""
|
|
296
|
+
.. deprecated::
|
|
297
|
+
This attribute is deprecated. Use GEN_AI_RESPONSE_STREAMING instead.
|
|
298
|
+
|
|
235
299
|
Whether or not the AI model call's response was streamed back asynchronously
|
|
236
300
|
Example: true
|
|
237
301
|
"""
|
|
238
302
|
|
|
239
303
|
AI_TAGS = "ai.tags"
|
|
240
304
|
"""
|
|
305
|
+
.. deprecated::
|
|
306
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
307
|
+
|
|
241
308
|
Tags that describe an AI pipeline step.
|
|
242
309
|
Example: {"executed_function": "add_integers"}
|
|
243
310
|
"""
|
|
244
311
|
|
|
245
312
|
AI_TEMPERATURE = "ai.temperature"
|
|
246
313
|
"""
|
|
314
|
+
.. deprecated::
|
|
315
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_TEMPERATURE instead.
|
|
316
|
+
|
|
247
317
|
For an AI model call, the temperature parameter. Temperature essentially means how random the output will be.
|
|
248
318
|
Example: 0.5
|
|
249
319
|
"""
|
|
250
320
|
|
|
251
321
|
AI_TEXTS = "ai.texts"
|
|
252
322
|
"""
|
|
323
|
+
.. deprecated::
|
|
324
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
325
|
+
|
|
253
326
|
Raw text inputs provided to the model.
|
|
254
327
|
Example: ["What is machine learning?"]
|
|
255
328
|
"""
|
|
256
329
|
|
|
257
330
|
AI_TOP_K = "ai.top_k"
|
|
258
331
|
"""
|
|
332
|
+
.. deprecated::
|
|
333
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_TOP_K instead.
|
|
334
|
+
|
|
259
335
|
For an AI model call, the top_k parameter. Top_k essentially controls how random the output will be.
|
|
260
336
|
Example: 35
|
|
261
337
|
"""
|
|
262
338
|
|
|
263
339
|
AI_TOP_P = "ai.top_p"
|
|
264
340
|
"""
|
|
341
|
+
.. deprecated::
|
|
342
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_TOP_P instead.
|
|
343
|
+
|
|
265
344
|
For an AI model call, the top_p parameter. Top_p essentially controls how random the output will be.
|
|
266
345
|
Example: 0.5
|
|
267
346
|
"""
|
|
268
347
|
|
|
269
348
|
AI_TOOL_CALLS = "ai.tool_calls"
|
|
270
349
|
"""
|
|
350
|
+
.. deprecated::
|
|
351
|
+
This attribute is deprecated. Use GEN_AI_RESPONSE_TOOL_CALLS instead.
|
|
352
|
+
|
|
271
353
|
For an AI model call, the function that was called. This is deprecated for OpenAI, and replaced by tool_calls
|
|
272
354
|
"""
|
|
273
355
|
|
|
274
356
|
AI_TOOLS = "ai.tools"
|
|
275
357
|
"""
|
|
358
|
+
.. deprecated::
|
|
359
|
+
This attribute is deprecated. Use GEN_AI_REQUEST_AVAILABLE_TOOLS instead.
|
|
360
|
+
|
|
276
361
|
For an AI model call, the functions that are available
|
|
277
362
|
"""
|
|
278
363
|
|
|
@@ -284,6 +369,9 @@ class SPANDATA:
|
|
|
284
369
|
|
|
285
370
|
AI_WARNINGS = "ai.warnings"
|
|
286
371
|
"""
|
|
372
|
+
.. deprecated::
|
|
373
|
+
This attribute is deprecated. Use GEN_AI_* attributes instead.
|
|
374
|
+
|
|
287
375
|
Warning messages generated during model execution.
|
|
288
376
|
Example: ["Token limit exceeded"]
|
|
289
377
|
"""
|
|
@@ -382,6 +470,36 @@ class SPANDATA:
|
|
|
382
470
|
Example: "chat"
|
|
383
471
|
"""
|
|
384
472
|
|
|
473
|
+
GEN_AI_PIPELINE_NAME = "gen_ai.pipeline.name"
|
|
474
|
+
"""
|
|
475
|
+
Name of the AI pipeline or chain being executed.
|
|
476
|
+
Example: "qa-pipeline"
|
|
477
|
+
"""
|
|
478
|
+
|
|
479
|
+
GEN_AI_RESPONSE_FINISH_REASONS = "gen_ai.response.finish_reasons"
|
|
480
|
+
"""
|
|
481
|
+
The reason why the model stopped generating.
|
|
482
|
+
Example: "COMPLETE"
|
|
483
|
+
"""
|
|
484
|
+
|
|
485
|
+
GEN_AI_RESPONSE_ID = "gen_ai.response.id"
|
|
486
|
+
"""
|
|
487
|
+
Unique identifier for the completion.
|
|
488
|
+
Example: "gen_123abc"
|
|
489
|
+
"""
|
|
490
|
+
|
|
491
|
+
GEN_AI_RESPONSE_MODEL = "gen_ai.response.model"
|
|
492
|
+
"""
|
|
493
|
+
Exact model identifier used to generate the response
|
|
494
|
+
Example: gpt-4o-mini-2024-07-18
|
|
495
|
+
"""
|
|
496
|
+
|
|
497
|
+
GEN_AI_RESPONSE_STREAMING = "gen_ai.response.streaming"
|
|
498
|
+
"""
|
|
499
|
+
Whether or not the AI model call's response was streamed back asynchronously
|
|
500
|
+
Example: true
|
|
501
|
+
"""
|
|
502
|
+
|
|
385
503
|
GEN_AI_RESPONSE_TEXT = "gen_ai.response.text"
|
|
386
504
|
"""
|
|
387
505
|
The model's response text messages.
|
|
@@ -421,7 +539,7 @@ class SPANDATA:
|
|
|
421
539
|
GEN_AI_REQUEST_MODEL = "gen_ai.request.model"
|
|
422
540
|
"""
|
|
423
541
|
The model identifier being used for the request.
|
|
424
|
-
Example: "gpt-4-turbo
|
|
542
|
+
Example: "gpt-4-turbo"
|
|
425
543
|
"""
|
|
426
544
|
|
|
427
545
|
GEN_AI_REQUEST_PRESENCE_PENALTY = "gen_ai.request.presence_penalty"
|
|
@@ -430,12 +548,24 @@ class SPANDATA:
|
|
|
430
548
|
Example: 0.1
|
|
431
549
|
"""
|
|
432
550
|
|
|
551
|
+
GEN_AI_REQUEST_SEED = "gen_ai.request.seed"
|
|
552
|
+
"""
|
|
553
|
+
The seed, ideally models given the same seed and same other parameters will produce the exact same output.
|
|
554
|
+
Example: "1234567890"
|
|
555
|
+
"""
|
|
556
|
+
|
|
433
557
|
GEN_AI_REQUEST_TEMPERATURE = "gen_ai.request.temperature"
|
|
434
558
|
"""
|
|
435
559
|
The temperature parameter used to control randomness in the output.
|
|
436
560
|
Example: 0.7
|
|
437
561
|
"""
|
|
438
562
|
|
|
563
|
+
GEN_AI_REQUEST_TOP_K = "gen_ai.request.top_k"
|
|
564
|
+
"""
|
|
565
|
+
Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered).
|
|
566
|
+
Example: 35
|
|
567
|
+
"""
|
|
568
|
+
|
|
439
569
|
GEN_AI_REQUEST_TOP_P = "gen_ai.request.top_p"
|
|
440
570
|
"""
|
|
441
571
|
The top_p parameter used to control diversity via nucleus sampling.
|
|
@@ -659,9 +789,11 @@ class OP:
|
|
|
659
789
|
FUNCTION_AWS = "function.aws"
|
|
660
790
|
FUNCTION_GCP = "function.gcp"
|
|
661
791
|
GEN_AI_CHAT = "gen_ai.chat"
|
|
792
|
+
GEN_AI_EMBEDDINGS = "gen_ai.embeddings"
|
|
662
793
|
GEN_AI_EXECUTE_TOOL = "gen_ai.execute_tool"
|
|
663
794
|
GEN_AI_HANDOFF = "gen_ai.handoff"
|
|
664
795
|
GEN_AI_INVOKE_AGENT = "gen_ai.invoke_agent"
|
|
796
|
+
GEN_AI_RESPONSES = "gen_ai.responses"
|
|
665
797
|
GRAPHQL_EXECUTE = "graphql.execute"
|
|
666
798
|
GRAPHQL_MUTATION = "graphql.mutation"
|
|
667
799
|
GRAPHQL_PARSE = "graphql.parse"
|
|
@@ -686,8 +818,6 @@ class OP:
|
|
|
686
818
|
MIDDLEWARE_STARLITE = "middleware.starlite"
|
|
687
819
|
MIDDLEWARE_STARLITE_RECEIVE = "middleware.starlite.receive"
|
|
688
820
|
MIDDLEWARE_STARLITE_SEND = "middleware.starlite.send"
|
|
689
|
-
OPENAI_CHAT_COMPLETIONS_CREATE = "ai.chat_completions.create.openai"
|
|
690
|
-
OPENAI_EMBEDDINGS_CREATE = "ai.embeddings.create.openai"
|
|
691
821
|
HUGGINGFACE_HUB_CHAT_COMPLETIONS_CREATE = (
|
|
692
822
|
"ai.chat_completions.create.huggingface_hub"
|
|
693
823
|
)
|
|
@@ -831,6 +961,8 @@ class ClientConstructor:
|
|
|
831
961
|
custom_repr: Optional[Callable[..., Optional[str]]] = None,
|
|
832
962
|
add_full_stack: bool = DEFAULT_ADD_FULL_STACK,
|
|
833
963
|
max_stack_frames: Optional[int] = DEFAULT_MAX_STACK_FRAMES,
|
|
964
|
+
enable_logs: bool = False,
|
|
965
|
+
before_send_log: Optional[Callable[[Log, Hint], Optional[Log]]] = None,
|
|
834
966
|
) -> None:
|
|
835
967
|
"""Initialize the Sentry SDK with the given parameters. All parameters described here can be used in a call to `sentry_sdk.init()`.
|
|
836
968
|
|
|
@@ -1217,6 +1349,14 @@ class ClientConstructor:
|
|
|
1217
1349
|
|
|
1218
1350
|
:param instrumenter:
|
|
1219
1351
|
|
|
1352
|
+
:param enable_logs: Set `enable_logs` to True to enable the SDK to emit
|
|
1353
|
+
Sentry logs. Defaults to False.
|
|
1354
|
+
|
|
1355
|
+
:param before_send_log: An optional function to modify or filter out logs
|
|
1356
|
+
before they're sent to Sentry. Any modifications to the log in this
|
|
1357
|
+
function will be retained. If the function returns None, the log will
|
|
1358
|
+
not be sent to Sentry.
|
|
1359
|
+
|
|
1220
1360
|
:param _experiments:
|
|
1221
1361
|
"""
|
|
1222
1362
|
pass
|
|
@@ -1241,4 +1381,4 @@ DEFAULT_OPTIONS = _get_default_options()
|
|
|
1241
1381
|
del _get_default_options
|
|
1242
1382
|
|
|
1243
1383
|
|
|
1244
|
-
VERSION = "3.0.
|
|
1384
|
+
VERSION = "3.0.0a5"
|
|
@@ -161,7 +161,7 @@ def _sentry_patched_create_common(f: Any, *args: Any, **kwargs: Any) -> Any:
|
|
|
161
161
|
op=OP.ANTHROPIC_MESSAGES_CREATE,
|
|
162
162
|
description="Anthropic messages create",
|
|
163
163
|
origin=AnthropicIntegration.origin,
|
|
164
|
-
|
|
164
|
+
only_as_child_span=True,
|
|
165
165
|
)
|
|
166
166
|
span.__enter__()
|
|
167
167
|
|