Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Voltane-EU_djfapi /djfapi /middleware /sentry.py
| from starlette.types import Message | |
| from sentry_sdk import Hub | |
| class SentryAsgiMiddleware: | |
| __slots__ = ('app',) | |
| def __init__(self, app): | |
| self.app = app | |
| async def __call__(self, scope, receive, send): | |
| async def _send(message: Message): | |
| try: | |
| message.get('headers', list()).append( | |
| (b'X-Flow-ID', Hub.current.scope.transaction.to_traceparent()) | |
| ) | |
| except AttributeError: | |
| pass | |
| await send(message) | |
| return await self.app(scope, receive, _send) | |
Xet Storage Details
- Size:
- 584 Bytes
- Xet hash:
- 22f6f01ddcbdf70464e282101777d39b7c9648dab866361bb41f82b42cf8b6d5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.