PATH:
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
sentry_sdk
/
integrations
import os import sys import atexit import sentry_sdk from sentry_sdk.utils import logger from sentry_sdk.integrations import Integration from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Any from typing import Optional def default_callback(pending, timeout): # type: (int, int) -> None """This is the default shutdown callback that is set on the options. It prints out a message to stderr that informs the user that some events are still pending and the process is waiting for them to flush out. """ def echo(msg): # type: (str) -> None sys.stderr.write(msg + "\n") echo("Sentry is attempting to send %i pending events" % pending) echo("Waiting up to %s seconds" % timeout) echo("Press Ctrl-%s to quit" % (os.name == "nt" and "Break" or "C")) sys.stderr.flush() class AtexitIntegration(Integration): identifier = "atexit" def __init__(self, callback=None): # type: (Optional[Any]) -> None if callback is None: callback = default_callback self.callback = callback @staticmethod def setup_once(): # type: () -> None @atexit.register def _shutdown(): # type: () -> None client = sentry_sdk.get_client() integration = client.get_integration(AtexitIntegration) if integration is None: return logger.debug("atexit: got shutdown signal") logger.debug("atexit: shutting down client") sentry_sdk.get_isolation_scope().end_session() client.close(callback=integration.callback)
[-] aws_lambda.py
[edit]
[+]
__pycache__
[-] chalice.py
[edit]
[-] anthropic.py
[edit]
[-] unleash.py
[edit]
[-] atexit.py
[edit]
[-] rq.py
[edit]
[-] gnu_backtrace.py
[edit]
[-] langgraph.py
[edit]
[+]
spark
[-] aiohttp.py
[edit]
[-] socket.py
[edit]
[-] sys_exit.py
[edit]
[-] boto3.py
[edit]
[-] sqlalchemy.py
[edit]
[-] asyncpg.py
[edit]
[-] openfeature.py
[edit]
[-] modules.py
[edit]
[-] executing.py
[edit]
[-] wsgi.py
[edit]
[-] dedupe.py
[edit]
[-] __init__.py
[edit]
[-] huey.py
[edit]
[-] fastapi.py
[edit]
[-] stdlib.py
[edit]
[-] cloud_resource_context.py
[edit]
[-] starlette.py
[edit]
[-] flask.py
[edit]
[-] bottle.py
[edit]
[-] starlite.py
[edit]
[-] rust_tracing.py
[edit]
[-] otlp.py
[edit]
[-] statsig.py
[edit]
[-] excepthook.py
[edit]
[-] ariadne.py
[edit]
[+]
pydantic_ai
[+]
..
[-] sanic.py
[edit]
[+]
google_genai
[+]
django
[+]
openai_agents
[-] dramatiq.py
[edit]
[-] langchain.py
[edit]
[-] graphene.py
[edit]
[-] loguru.py
[edit]
[-] clickhouse_driver.py
[edit]
[+]
celery
[-] tornado.py
[edit]
[-] strawberry.py
[edit]
[-] arq.py
[edit]
[-] litellm.py
[edit]
[-] openai.py
[edit]
[-] beam.py
[edit]
[-] launchdarkly.py
[edit]
[+]
grpc
[-] threading.py
[edit]
[+]
opentelemetry
[-] _wsgi_common.py
[edit]
[-] _asgi_common.py
[edit]
[-] argv.py
[edit]
[-] litestar.py
[edit]
[-] httpx.py
[edit]
[-] pymongo.py
[edit]
[-] mcp.py
[edit]
[-] cohere.py
[edit]
[-] pyramid.py
[edit]
[-] unraisablehook.py
[edit]
[-] quart.py
[edit]
[-] falcon.py
[edit]
[-] pure_eval.py
[edit]
[+]
redis
[-] logging.py
[edit]
[-] asgi.py
[edit]
[-] gql.py
[edit]
[-] gcp.py
[edit]
[-] ray.py
[edit]
[-] trytond.py
[edit]
[-] huggingface_hub.py
[edit]
[-] asyncio.py
[edit]
[-] typer.py
[edit]
[-] serverless.py
[edit]