def trace_handler_request_exception(wrapped, instance, args, kwargs): """ """ tracker = obtain_tracker_from_request(instance.request) with TrackerTransferContext(tracker): record_exception(sys.exc_info()) return wrapped(*args, **kwargs)
def trace_handler_execute(wrapped, instance, args, kwargs): """ """ handler = instance request = handler.request if not request: console.warning("No request instance got from handler. this maybe agent potential design issues. " "if this continue, please report to us.") return wrapped(*args, **kwargs) tracker = obtain_tracker_from_request(request) if not tracker: return wrapped(*args, **kwargs) if request.method not in handler.SUPPORTED_METHODS: name = object_name(wrapped) else: name = object_name(getattr(handler, request.method.lower())) tracker.set_tracker_name(name, priority=3) with TrackerTransferContext(tracker): return wrapped(*args, **kwargs)
def trace_add_handler(wrapped, instance, args, kwargs): """ """ with TrackerTransferContext(None): return wrapped(*args, **kwargs)
def trace_call_at(wrapped, instance, args, kwargs): """ """ with TrackerTransferContext(None): return wrapped(*args, **kwargs)
def trace_add_callback_from_signal(wrapped, instance, args, kwargs): with TrackerTransferContext(None): return wrapped(*args, **kwargs)