def METHOD_NAME(self, key_values, timestamp=None):
    exc_type, exc_val, exc_tb = None, None, None
    if "python.exception.type" in key_values:
        exc_type = key_values["python.exception.type"]
        exc_val = key_values.get("python.exception.val")
        exc_tb = key_values.get("python.exception.tb")
    elif ot_logs and key_values.get(ot_logs.EVENT) == tags.ERROR:
        exc_type = key_values[ot_logs.ERROR_KIND]
        exc_val = key_values.get(ot_logs.ERROR_OBJECT)
        exc_tb = key_values.get(ot_logs.STACK)
    else:
        logger.debug("Can't handle non-exception type opentracing logs")
    if exc_type:
        agent = self.tracer._agent
        agent.capture_exception(exc_info=(exc_type, exc_val, exc_tb))
    return self