Transport that records events instead of sending them over the network.
| 13 | |
| 14 | |
| 15 | class CaptureTransport(Transport): |
| 16 | """Transport that records events instead of sending them over the network.""" |
| 17 | |
| 18 | def __init__(self, options=None): |
| 19 | super().__init__(options) |
| 20 | self.events = [] |
| 21 | |
| 22 | def capture_envelope(self, envelope: Envelope): |
| 23 | event = envelope.get_event() |
| 24 | if event is not None: |
| 25 | self.events.append(event) |
| 26 | |
| 27 | |
| 28 | def make_exc_info(exception): |
no outgoing calls